Skip to content

fix: stop scoping LATEST dependency resolution to --branch flag @W-21617695@#898

Open
WillieRuemmele wants to merge 1 commit into
mainfrom
wr/fixLatestDependencyBranchScoping
Open

fix: stop scoping LATEST dependency resolution to --branch flag @W-21617695@#898
WillieRuemmele wants to merge 1 commit into
mainfrom
wr/fixLatestDependencyBranchScoping

Conversation

@WillieRuemmele

@WillieRuemmele WillieRuemmele commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • When --branch is passed to sf package version create, LATEST dependency resolution now falls back to the null branch (main/released versions) if the dependency has no versions on the specified branch
  • Previously, this would fail with NoReleaseVersionFoundForBranchError — now it gracefully resolves from the unscoped branch
  • Dependencies that DO have versions on the branch still resolve from that branch (existing behavior preserved)
  • Dependencies with an explicit branch in their config still use that branch (existing behavior preserved)

Fixes forcedotcom/cli#3517

Work Item

@W-21617695@: LATEST dependency resolution incorrectly scoped to --branch for all packages

Proof of Work

  • Tests: 275 passing, 0 failing
  • Lint: clean (0 errors)
  • Type check: clean

Test plan

  • Run sf package version create --branch <branch> with dependencies using LATEST that don't have versions on the specified branch — should now succeed by falling back to null branch resolution
  • Run sf package version create --branch <branch> with dependencies that DO have versions on the branch — should resolve LATEST from that branch (existing behavior)
  • Run sf package version create --branch <branch> with dependencies that have an explicit branch in their config — should still resolve against that explicit branch
  • Run sf package version create (no --branch flag) with LATEST dependencies — behavior unchanged (resolves against null branch)
  • Run with dependency.branch set to empty string '' — should resolve against null branch (existing behavior preserved)

@WillieRuemmele
WillieRuemmele force-pushed the wr/fixLatestDependencyBranchScoping branch from 58d14bc to b7d2016 Compare July 20, 2026 21:06
@WillieRuemmele
WillieRuemmele force-pushed the wr/fixLatestDependencyBranchScoping branch from b7d2016 to 081e13f Compare July 20, 2026 21:19
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.

LATEST dependency resolution incorrectly scoped to --branch for all packages

1 participant