Skip to content

build(nix): reuse cached upstream Go compiler - #227

Merged
flemzord merged 1 commit into
mainfrom
build/nix-upstream-go-cache
Oct 27, 2026
Merged

flemzord merged 1 commit into
mainfrom
build/nix-upstream-go-cache

Conversation

@flemzord

Copy link
Copy Markdown
Member

Summary

The imported Go recipe and overridden module builder create a different compiler derivation from upstream, missing its binary-cache entries. Select upstream Go 1.27.3 and buildGo127Module from a dedicated stable nixpkgs-go input locked to 1f607aa79b6356ed45d3cd3c8079c196e79efa2c, with exact lock metadata from formancehq/ledger#2391. Retain the golangci-lint 2.15.0 recipe on that matching upstream builder and set GOTOOLCHAIN=local.

Preserve all original stable, unstable, NUR and go-tooling lock nodes, all four platforms, Go language minima and application dependencies. No mockgen or additional flake/helper exists in this repository. Document compiler selection in CONTRIBUTING.md.

Validation

  • Nix parse and flake metadata with --no-write-lock-file passed.
  • Full shell derivation evaluation passed for x86_64/aarch64 Linux and Darwin, on both exact base and patch. No baseline evaluation blocker was observed.
  • Each system selects Go 1.27.3; the upstream builder and retained linter both have exactly the shell compiler's derivation identity; golangci-lint evaluates to 2.15.0.
  • Public cache.nixos.org narinfo: all four original compiler outputs return HTTP 404; all four selected upstream compiler outputs return HTTP 200 with matching StorePath. This verifies compiler cache availability, not the entire shell closure. The retained linter can still require compilation.
  • Exact JSON comparison confirms every existing non-root lock node is unchanged; only the compiler input and root edge are added. Focused diff and whitespace checks passed.
  • Per resource constraints, no realization, compiler/linter execution, just pre-commit, just tests, generation or heavy suite was run. Hosted qualification remains pending; keep this PR draft.

Created with gpt-6.1-sol in T3 Code (Codex harness).

@NumaryBot NumaryBot added risk: medium NumaryBot classified this pull request as medium risk. bot-reviewed NumaryBot completed its review workflow for the current head. draft-reviewed NumaryBot reviewed this draft, but published no readiness signal. labels Oct 27, 2026
@flemzord
flemzord marked this pull request as ready for review October 27, 2026 14:36
@flemzord
flemzord merged commit 31df7c7 into main Oct 27, 2026
6 checks passed
@flemzord
flemzord deleted the build/nix-upstream-go-cache branch October 27, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-reviewed NumaryBot completed its review workflow for the current head. draft-reviewed NumaryBot reviewed this draft, but published no readiness signal. risk: medium NumaryBot classified this pull request as medium risk.

Development

Successfully merging this pull request may close these issues.

2 participants