mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-03 05:13:36 +09:00
tools/bump: drop dependencies that outrun the nixpkgs Go
tailscale.com@main raised the go directive to 1.27.1 while nixpkgs was still on 1.27.0. go build downloads the newer toolchain and looks fine; the nix builders set GOTOOLCHAIN=local and fail, so the whole bump was being thrown away one area at a time.
This commit is contained in:
+4
-19
@@ -116,30 +116,15 @@ func verifyBuilders(ctx context.Context, r *repo) []finding {
|
||||
return findings
|
||||
}
|
||||
|
||||
// verifyToolchain reports, but never edits, a go.mod directive that has fallen
|
||||
// behind the toolchain the build actually uses. Raising it is a promise to
|
||||
// downstream packagers, so it stays a human decision.
|
||||
// verifyToolchain reports, but never edits, a go directive that has outrun the
|
||||
// toolchain nixpkgs ships. Raising it is a promise to downstream packagers, so
|
||||
// the decision stays with a human; lowering it is not this tool's call either.
|
||||
func verifyToolchain(ctx context.Context, r *repo) []finding {
|
||||
nixGo, err := goVersion(ctx, r)
|
||||
err := checkToolchain(ctx, r)
|
||||
if err != nil {
|
||||
return []finding{finding(err.Error())}
|
||||
}
|
||||
|
||||
ourMod, err := r.readFile("go.mod")
|
||||
if err != nil {
|
||||
return []finding{finding(err.Error())}
|
||||
}
|
||||
|
||||
ourGo, err := goDirective(ourMod)
|
||||
if err != nil {
|
||||
return []finding{finding(err.Error())}
|
||||
}
|
||||
|
||||
if semver.Compare("v"+ourGo, "v"+nixGo) > 0 {
|
||||
return []finding{finding(fmt.Sprintf(
|
||||
"go.mod requires go %s but the devShell provides %s", ourGo, nixGo))}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user