Documentation
¶
Overview ¶
Command gobump is the coordinated Go SDK/toolchain version bump CLI (issue #280, design.md D-1/D-2/D-3/D-6). It wires the pure scripts/gobump/sites registry (literal-replacement sites design.md D-4/D-5 cannot reach through GoRuntimeUpgrader) together with GoRuntimeUpgrader (providers/go, unchanged) to mutate every Go-module and literal-replacement site to a single target version, in the plan-then-mutate order design.md D-6 requires:
- sites.Plan first — pure, cheapest, zero side effects. If the registry is broken (moved/renamed anchor, missing file, ...), the run exits before a Dagger client is even connected: no Upgrade call, no Export, no write.
- Hardcoded GoRuntimeUpgrader.Upgrade call #1, workspace mode: Host().Directory(".") — the repo-root go.work workspace (root go.mod, providers/go/go.mod, providers/rust/go.mod, go.work, .go-version).
- Hardcoded GoRuntimeUpgrader.Upgrade call #2, single-module mode: Host().Directory(".dagger") — .dagger/go.mod, deliberately excluded from go.work (design.md D-3), handled by the same Upgrade method's existing single-module branch unchanged.
- Export both resulting directories back to the host, never Wipe, and only after BOTH Upgrade calls have succeeded.
- sites.Apply last, using the edits Plan already computed in step 1.
scripts/gobump/main.go itself makes no filesystem or Dagger-client decision that isn't already covered by this order: requireRepoRoot is the only pure, independently unit-tested logic here (Threat Matrix: git repository selection). Everything past it requires a live Dagger engine and is exercised by Phase 8's integration dry run, not a unit test in this package.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sites implements the literal-replacement half of the coordinated Go SDK/toolchain version bump (issue #280, design.md D-4/D-5/D-6): an explicit, enumerated registry of every plain-string Go version pin the GoRuntimeUpgrader provider cannot reach (workflow GO_VERSION env vars, Go source fallback constants, and documentation), plus a plan-then-mutate engine that resolves every registered Site before writing anything.
|
Package sites implements the literal-replacement half of the coordinated Go SDK/toolchain version bump (issue #280, design.md D-4/D-5/D-6): an explicit, enumerated registry of every plain-string Go version pin the GoRuntimeUpgrader provider cannot reach (workflow GO_VERSION env vars, Go source fallback constants, and documentation), plus a plan-then-mutate engine that resolves every registered Site before writing anything. |