Skip to content

fix: bind a git workspace's own clients by path - #2

Draft
eunomie wants to merge 1 commit into
mainfrom
fix-git-workspace-clients
Draft

eunomie wants to merge 1 commit into
mainfrom
fix-git-workspace-clients

Conversation

@eunomie

@eunomie eunomie commented Oct 23, 2026

Copy link
Copy Markdown
Member

dagger generate -W <git ref> resolves the workspace's own ./dep clients as Git sources. client_members chose the binding from that kind alone, so clients/<name>/target.rb got the Git URL and commit as REF/PIN instead of the workspace path.

A Git client is now bound by path when it belongs to the workspace: pin is the workspace commit, address and ref name the same repository (scheme ignored), selectors agree. Same rule as python-sdk #64/#65 and go-sdk #73/#78/#79, including the engine beta.20 <clone>#<version>:<subpath> form. A failed commit lookup keeps the Git binding.

Tests: 225 unit tests, RuboCop and Steep clean; git-workspace-generate-check fails on the old code (target.rb +2 -2) and passes on beta.20 (and on beta.19, the floor, before the last review round).

Not covered: a #-form workspace address, commit-SHA and subdirectory workspaces end to end, aliased selectors. On beta.20 the committed core clients and CORE_DIGEST are already stale, independent of this change.

Explain-changes: https://gistpreview.github.io/?5920bebd7d94c69535dd6c03875b252a

A workspace opened from a git ref resolves them as git sources pinned
to its commit, so their generated clients never matched the checkout's.

Signed-off-by: Yves Brissaud <yves@dagger.io>
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.

1 participant