Skip to content

remove unused buildvars.ComposeBuildDir Var#9704

Open
mlwelles wants to merge 1 commit into
mainfrom
mlwelles/remove-unused-composebuilddir
Open

remove unused buildvars.ComposeBuildDir Var#9704
mlwelles wants to merge 1 commit into
mainfrom
mlwelles/remove-unused-composebuilddir

Conversation

@mlwelles
Copy link
Copy Markdown
Contributor

Summary

buildvars.ComposeBuildDir (env var DGRAPH_COMPOSE_BUILD_DIR) landed in #9691 as a hook for forks that ran a compose-file generator: tests would route docker-compose through $DGRAPH_COMPOSE_BUILD_DIR to pick up a rewritten compose tree.

The Var has zero call sites — upstream code never reads it, and the downstream fork that #9691 was designed for has since pivoted to a runtime overlay synthesizer that operates in /tmp without any env hook. It is dead surface area; remove it.

Changes

  • buildvars/buildvars.go — drop the ComposeBuildDir = newVar("DGRAPH_COMPOSE_BUILD_DIR", "") declaration, the entry in var All, and the stale like ComposeBuildDir reference in the Var.defaultValue doc comment.
  • buildvars/buildvars_test.go — drop the ComposeBuildDir row from TestPackageDefaults.
  • t/hooks.go — remove the $DGRAPH_COMPOSE_BUILD_DIR example from the ComposeFileArgs docstring. Replace with a generic "fork may override to layer additional -f, switch the path, or add --project-directory" description that doesn't presume a particular fork's mechanism.

Verification

go build ./buildvars/... ./t/...   # clean
go test ./buildvars/...            # ok

Backward compatibility

No call sites, no published API stability promise yet (#9691 just merged), and the env var has the empty-string default — so there's no observable behavior change for any consumer that was honoring upstream defaults.

ComposeBuildDir was introduced as part of #9691 to support a fork's
compose-file generator: tests would route docker-compose invocations
through $DGRAPH_COMPOSE_BUILD_DIR to pick up a rewritten compose tree.
The fork has since pivoted to a runtime overlay synthesizer that
operates entirely in /tmp, leaving ComposeBuildDir with zero call
sites — neither in upstream nor in any downstream consumer we know
about. The Var is dead surface area.

Removes:

  buildvars/buildvars.go     ComposeBuildDir declaration + All slice entry +
                             stale doc-comment reference on Var.defaultValue
  buildvars/buildvars_test.go ComposeBuildDir case from TestPackageDefaults
  t/hooks.go                 $DGRAPH_COMPOSE_BUILD_DIR mention in the
                             ComposeFileArgs docstring; doc tightened to
                             describe the override contract in generic terms
@mlwelles mlwelles requested a review from a team as a code owner May 16, 2026 03:11
@github-actions github-actions Bot added area/testing Testing related issues go Pull requests that update Go code labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Testing related issues go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

1 participant