Uh oh!
There was an error while loading. Please reload this page.
feat: reference an out-of-repo module in a workspace (#350) - #351
Open
antoinetoussaint-byte wants to merge 1 commit into
Open
feat: reference an out-of-repo module in a workspace (#350)#351antoinetoussaint-byte wants to merge 1 commit into
antoinetoussaint-byte wants to merge 1 commit into
Conversation
Allow a workspace module reference to resolve to an out-of-repo module via a relative path override, so a solution repo can be the composition root that references a host module (a sibling checkout) without vendoring a copy of it. Module references are a composition root and now permit upward-traversing relative overrides (e.g. `path: ../module-saas-starter`), matching the existing precedent that absolute overrides are a deliberate external location. Service/job/application overrides stay confined to their owning resource. Module-graph loading and cross-boundary dependency wiring already work once the reference resolves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antoinetoussaint-byteforce-pushed
the
issue-350-reference-an-out-of-repo-module-in-a
branch
from
August 24, 2026 02:27
53ed79c to
1001aacCompare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#350.
Summary
path:override (ModuleReference.PathOverride),Workspace.ModulePathresolves it, andLoadModules/LoadServicesload a referenced module's services into the run/render graph the same as in-repo ones. Cross-boundary endpoint/dependency wiring (ValidateServiceDependencies) already works on whatever the reference resolves to.filepath.IsLocal, so only a non-portable absolute path could point out-of-repo. A composition-root workspace committed to git needs a portable relative reference to a sibling checkout (path: ../module-saas-starter) — which was rejected.Workspace.ModulePathjoins a relative override onto the workspace dir (path.Join(workspace.Dir(), override)), andLoadWorkspaceFromDirresolves the workspace dir to an absolute path up front — sopath: ../hostresolves relative to the workspace root regardless of the invocation cwd. That cwd-independence is what makes the relative form committable and portable across machines.External git/OCI sources remain future work, as the issue scopes them ("and later an external git/OCI source"); this delivers the path-reference form.
Test plan
go test ./resources/... ./architecture/...(module-layout + path-boundary suites) passlayout: modulesworkspace referencing an out-of-repo module viapath: ../hostloads the sibling module's services and validates a cross-boundary service dependency on its public endpoint. Asserts the committed override is the relative form (../host), not an absolute machine path — the portability property is the point.../host, still rejects NUL/backslash; service reference override still rejects../traversalgo build ./...,go vet ./resources/,gofmtclean🤖 Generated with Claude Code