mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
bump unsupportedGo to mark Go 1.24 as supported
debugdir.txtar also needed tweaking as runtime/map.go is gone starting in Go 1.24. Finally, modinfo.txtar needed tweaking since Go 1.24 started stamping Go binaries with VCS-derived module versions, so we no longer end up with empty "(devel)" versions.
This commit is contained in:
committed by
Paul Scheduikat
parent
e8392a640a
commit
2adfc43326
2
main.go
2
main.go
@@ -292,7 +292,7 @@ func (e errJustExit) Error() string { return fmt.Sprintf("exit: %d", e) }
|
||||
func goVersionOK() bool {
|
||||
const (
|
||||
minGoVersion = "go1.23.5" // the minimum Go version we support; could be a bugfix release if needed
|
||||
unsupportedGo = "go1.24" // the first major version we don't support
|
||||
unsupportedGo = "go1.25" // the first major version we don't support
|
||||
)
|
||||
|
||||
// rxVersion looks for a version like "go1.2" or "go1.2.3" in `go env GOVERSION`.
|
||||
|
||||
2
testdata/script/debugdir.txtar
vendored
2
testdata/script/debugdir.txtar
vendored
@@ -1,6 +1,6 @@
|
||||
exec garble -debugdir ./debug1 build
|
||||
exists 'debug1/test/main/imported/imported.go' 'debug1/test/main/main.go' 'debug1/reflect/type.go'
|
||||
exists 'debug1/runtime/map.go' 'debug1/runtime/funcdata.h' 'debug1/runtime/asm.s'
|
||||
exists 'debug1/runtime/error.go' 'debug1/runtime/funcdata.h' 'debug1/runtime/asm.s'
|
||||
[amd64] exists 'debug1/runtime/cpuflags_amd64.go' 'debug1/runtime/asm_amd64.s'
|
||||
[!amd64] ! exists 'debug1/runtime/cpuflags_amd64.go' 'debug1/runtime/asm_amd64.s'
|
||||
! grep ImportedFunc $WORK/debug1/test/main/imported/imported.go
|
||||
|
||||
2
testdata/script/goversion.txtar
vendored
2
testdata/script/goversion.txtar
vendored
@@ -38,7 +38,7 @@ stderr 'Go version "go1\.14" is too old; please upgrade to go1\.23\.5 or newer'
|
||||
env GARBLE_TEST_GOVERSION='go1.28.2'
|
||||
env TOOLCHAIN_GOVERSION='go1.28.2'
|
||||
! exec garble build
|
||||
stderr 'Go version "go1\.28\.2" is too new; Go linker patches aren''t available for go1\.24 or later yet'
|
||||
stderr 'Go version "go1\.28\.2" is too new; Go linker patches aren''t available for go1\.25 or later yet'
|
||||
|
||||
# We should accept custom devel strings.
|
||||
env TOOLCHAIN_GOVERSION='devel go1.23.5-somecustomversion'
|
||||
|
||||
9
testdata/script/modinfo.txtar
vendored
9
testdata/script/modinfo.txtar
vendored
@@ -7,22 +7,25 @@
|
||||
[exec:git] setenvfile HEAD_COMMIT_SHA stdout
|
||||
|
||||
exec garble build -tags veryuniquebuildtag
|
||||
! binsubstr main$exe '(devel)' 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||||
|
||||
go version -m main$exe
|
||||
stdout 'main(\.exe)?: unknown'
|
||||
stdout -count=1 '^.+$' # expect just one line
|
||||
|
||||
! binsubstr main$exe '(devel)' 'v0.0.0-202' 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||||
|
||||
[short] stop # no need to verify this with -short
|
||||
|
||||
go build -tags veryuniquebuildtag
|
||||
binsubstr main$exe '(devel)' 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||||
|
||||
go version -m main$exe
|
||||
stdout 'path\s*test/main'
|
||||
stdout 'mod\s*test/main\s*\(devel\)'
|
||||
[go1.24] stdout 'mod\s*test/main\s*v0\.0\.0-202\d'
|
||||
stdout 'build\s*-tags=veryuniquebuildtag'
|
||||
stdout 'build\s*vcs.revision='${HEAD_COMMIT_SHA}
|
||||
|
||||
binsubstr main$exe 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||||
[go1.24] binsubstr main$exe 'v0.0.0-202'
|
||||
-- go.mod --
|
||||
module test/main
|
||||
|
||||
|
||||
Reference in New Issue
Block a user