feat(scratch): Add support for installing scratch repositories with uv.lock - #1679
Relm-Arrowny wants to merge 3 commits into
Conversation
uv.lock
uv.lockuv.lock
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1679 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 46 46
Lines 3665 3670 +5
=======================================
+ Hits 3531 3536 +5
Misses 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ZohebShaikh
left a comment
There was a problem hiding this comment.
use_uv_lock as designed doesn't really deliver on its own premise. Because blueapi installs scratch repos into one shared environment, no single repo's uv.lock tells you what's actually installed in blueapi — it only reflects that repo's own resolution. If repo A opts into use_uv_lock and repo B doesn't (or B has its own lockfile with different pinned versions), B's install can silently override dependencies A's lock was relying on. Per-repo opt-in doesn't prevent this, and worse, it doesn't even reliably work per-repo: if two use_uv_lock repos pin different versions of the same transitive dependency, the outcome depends on install order — it'll work by accident in some configs and break in others.
Proposed fix: move use_uv_lock up to ScratchConfig (not per-repo), so it's an explicit, all-or-nothing decision about the whole scratch environment's install strategy, plus a configurable path to the lockfile to use (defaulting to uv.lock when there's only one scratch repo). For multiple repos, there's no sound way to combine independently-generated lockfiles at install time — a consolidated lockfile covering all scratch repos together needs to be generated in CI at release time instead.
fix #1678
Just notice you can do target version: so may be this is not needed.
Changes
use_uv_lockinScratchRepositoryscratch_installto make use ofuse_uv_lockto allowuv sync