Filtered Dagger builds break Go's native buildvcs metadata by giving go build an incoherent Git worktree.
- Mounts filtered source without a complete tracked worktree, so Git reports omitted files as deleted and stamps clean binaries as modified.
- Omits required Git objects in some build contexts, causing
go build to fail while collecting VCS status.
- Forces users to choose between cache-friendly Dagger inputs and standard Go metadata, where projects expect
debug.ReadBuildInfo and go version -m to work.
- Lacks an explicit native-
buildvcs mode, making incorrect or missing metadata surprising.
Desired: add a documented native buildvcs mode that prepares a coherent full or sparse Git worktree, while keeping ordinary filtered builds from emitting misleading VCS metadata.
Acceptance:
- Builds a tiny binary with
vcs.revision set.
- Reports
vcs.modified=false for clean source.
- Reports
vcs.modified=true when an included tracked source file changes.
- Does not mark binaries dirty because unrelated tracked files were intentionally excluded.
- Does not require tags or remote refs.
Filtered Dagger builds break Go's native
buildvcsmetadata by givinggo buildan incoherent Git worktree.go buildto fail while collecting VCS status.debug.ReadBuildInfoandgo version -mto work.buildvcsmode, making incorrect or missing metadata surprising.Desired: add a documented native
buildvcsmode that prepares a coherent full or sparse Git worktree, while keeping ordinary filtered builds from emitting misleading VCS metadata.Acceptance:
vcs.revisionset.vcs.modified=falsefor clean source.vcs.modified=truewhen an included tracked source file changes.