Skip to content

fix(deps): defer workspace replacement loading - #606

Merged
wolfy-j merged 4 commits into
mainfrom
fix/workspace-replacement-lazy-load
Aug 30, 2026
Merged

fix(deps): defer workspace replacement loading#606
wolfy-j merged 4 commits into
mainfrom
fix/workspace-replacement-lazy-load

Conversation

@skhaz

@skhaz skhaz commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Why

A workspace may declare replacements for modules that are not selected by the current lock graph. Treating every replacement as a runtime load path makes an unrelated or temporarily absent workspace directory break boot and lets unselected source participate in pack, install, and artifact preparation.

What

  • Make the existing GetModuleLoadPaths contract return only app source and modules selected by the lock graph.
  • Apply a replacement only when its source module is selected; selected replacements retain version, digest, root, and source-root semantics.
  • Keep dependency discovery separate: wippy update scans effective workspace replacement roots directly so an unselected local module can still contribute dependency constraints before resolution.
  • Keep GetLoadPaths as the path-only view of the same canonical selection; no boot-only API or parallel load-path vocabulary.

The unrelated offline dependency-chain diagnostics were removed from this PR.

Verification

  • go test -race -count=1 ./boot/deps/lock ./cmd/internal/entries ./cmd/wippy/cmd
  • golangci-lint on the changed dependency and CLI packages
  • Targeted coverage for unselected replacement exclusion, selected root fallback, selected replacement metadata, and workspace replacement dependency scanning

@wolfy-j
wolfy-j force-pushed the fix/workspace-replacement-lazy-load branch 2 times, most recently from 72c8635 to f77d048 Compare August 26, 2026 17:25
@wolfy-j wolfy-j closed this Aug 26, 2026
@wolfy-j wolfy-j reopened this Aug 26, 2026
@wolfy-j
wolfy-j force-pushed the fix/workspace-replacement-lazy-load branch from cb244cf to 86f6049 Compare August 26, 2026 18:22

@wolfy-j wolfy-j left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified replacement ownership boundary: boot/install load only selected graph sources; update retains all declared replacement inputs for resolution; malformed declarations remain rejected. Focused lock and command tests pass.

@wolfy-j
wolfy-j merged commit 61987f1 into main Aug 30, 2026
5 checks passed
@wolfy-j
wolfy-j deleted the fix/workspace-replacement-lazy-load branch August 30, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants