mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
Go 1.21.0 was released in August 2023, so our upcoming release will no longer support the Go 1.20 release series. The first Go 1.22 release candidate is also due in December 2023, less than a month from now, so dropping 1.20 will simplify 1.22 work.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
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'
|
|
[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
|
|
! grep ImportedFunc $WORK/debug1/test/main/main.go
|
|
! grep 'some comment' $WORK/debug1/test/main/main.go
|
|
|
|
[short] stop
|
|
|
|
# Sources from previous builds should be deleted
|
|
cp $WORK/debug1/test/main/main.go $WORK/debug1/some_file_from_prev_build.go
|
|
|
|
exec garble -debugdir ./debug1 build -v
|
|
stderr 'test/main' # we force rebuilds with -debugdir
|
|
! exists $WORK/debug1/some_file_from_prev_build.go
|
|
-- go.mod --
|
|
module test/main
|
|
|
|
go 1.21
|
|
-- main.go --
|
|
package main
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
"test/main/imported" // some comment
|
|
)
|
|
|
|
type someType int // some comment
|
|
var someVar = 0
|
|
|
|
type someStruct struct {
|
|
someField int // some comment
|
|
}
|
|
|
|
func main() {
|
|
imported.ImportedFunc()
|
|
reflect.TypeOf(123)
|
|
}
|
|
|
|
-- imported/imported.go --
|
|
package imported
|
|
|
|
func ImportedFunc() {}
|