Skip to content

Support pinning forked Go modules#167

Open
floze-the-genius wants to merge 2 commits into
bwplotka:mainfrom
floze-the-genius:agent/support-fork-modules
Open

Support pinning forked Go modules#167
floze-the-genius wants to merge 2 commits into
bwplotka:mainfrom
floze-the-genius:agent/support-fork-modules

Conversation

@floze-the-genius

@floze-the-genius floze-the-genius commented Jul 18, 2026

Copy link
Copy Markdown

Closes #110.

What changed

  • detect when a downloaded module declares a different module path
  • keep the resolved fork pseudo-version while requiring the declared upstream module path
  • add an automatic replace directive from the declared path to the fork
  • close the parsed cached go.mod after reading its directives
  • add an end-to-end regression using the ypresto/CompileDaemon fork from the issue
  • skip the existing benchstat@latest test on Go 1.24 because the current x/perf latest now requires Go 1.25; the case still runs on Go 1.25

Why

Bingo resolved the fork version, but generated a direct requirement for the fork repository path. Go then rejected the module because its go.mod still declares the upstream path. Using the declared path plus a versioned replace preserves the real fork revision and makes both bingo get and generated helper builds work.

The benchstat guard only stabilizes the existing Go 1.24 CI lane after an external dependency drift. The new fork regression still runs on Go 1.24 and Go 1.25 on both supported platforms.

Validation

  • gofmt -w get.go get_e2e_test.go
  • focused fork regression on Go 1.24.9, Go 1.24.13, Go 1.25.7, Go 1.25.12, and Go 1.26.2
  • GOTOOLCHAIN=go1.24.13 make test
  • make test
  • go vet -stdmethods=false ./...
  • make lint

Codex disclosure

This PR was prepared by OpenAI Codex at the contributor direction. Codex performed the repository and issue preflight, implementation, regression testing, CI log analysis, and local validation reported above.

Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com>
Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com>
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.

Add support for pinning and building forks

1 participant