I'm working with x/exp at CL 597177 PS 1, with a parent of golang/exp@7f521ea00fb803b5b0afbd67743292096b09056b
What did you see happen?
$ (cd ./trace/ && ./gen.bash $(go env GOROOT))
assuming Go checkout at /usr/local/go...
building file list ... done
deleting cmd/gotracevalidate/main.go
deleting cmd/gotracevalidate/
deleting cmd/gotraceraw/main.go
[ ... snip ... ]
traceviewer/static/webcomponents.min.js
version/
version/version.go
sent 4364398 bytes received 2274 bytes 2911114.67 bytes/sec
total size is 4559026 speedup is 1.04
sed: 1: "./cmd/gotraceraw/main.go": invalid command code .
With git reporting 52 files modified and 3 deleted.
What did you expect to see?
I expected ./trace/gen.bash to copy the execution trace parser from GOROOT (which it did), to apply the code rewrites necessary to use it in its new location (did not) and without deleting the hand-maintained files in the ./trace directory (did not).
This relates to the meaning of sed's "-i" flag being different on GNU vs BSD.
I'll prepare a patch to make it work on both. That probably means using a non-empty backup suffix and subsequently deleting those copies. Does that sound like a good plan, @mknyszek @cagedmantis ?
Go version
go version devel go1.23-06feff6279 Tue Jul 2 15:36:40 2024 -0700 darwin/arm64 [CL 596355 PS 1, parent is f12ac5be7045efcde39025c32cc01a20a305012c]
Output of
go env
in your module/workspace:What did you do?
In the x/exp repo, on macOS,
I'm working with x/exp at CL 597177 PS 1, with a parent of golang/exp@7f521ea00fb803b5b0afbd67743292096b09056b
What did you see happen?
With git reporting 52 files modified and 3 deleted.
What did you expect to see?
I expected ./trace/gen.bash to copy the execution trace parser from GOROOT (which it did), to apply the code rewrites necessary to use it in its new location (did not) and without deleting the hand-maintained files in the ./trace directory (did not).
This relates to the meaning of sed's "-i" flag being different on GNU vs BSD.
I'll prepare a patch to make it work on both. That probably means using a non-empty backup suffix and subsequently deleting those copies. Does that sound like a good plan, @mknyszek @cagedmantis ?