You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://go-review.googlesource.com/38409 broke field tracking somehow. Field tracking has no test and the only documentation I can find is internal to Google, so here's repro instructions.
First, build a toolchain with GOEXPERIMENT=fieldtrack. This is important and easy to miss. Then compile the following:
package main
import “fmt”
type T struct {
X int `go:”track”`
Y int `go:”track”`
}
func (t *T) String() string {
return fmt.Sprintf(“T(X=%d)”, t.X)
}
func (t *T) Sum() int {
return t.X + t.Y
}
func Run() {
t := new(T)
fmt.Println(t)
}
func main() {
Run()
}
The resulting object should have undefined symbols:
Issue #12174 had proposed adding a builder for this, but it deemed not important at the time, largely because this was a mostly Google-internal optimization/hack for one large logs processing job, and it shouldn't pollute the open source world. But it's kinda weird that it exists in open source anyway (as an experiment) but can't be tested. I'd still support adding tests + builder for it.
https://go-review.googlesource.com/38409 broke field tracking somehow. Field tracking has no test and the only documentation I can find is internal to Google, so here's repro instructions.
First, build a toolchain with GOEXPERIMENT=fieldtrack. This is important and easy to miss. Then compile the following:
The resulting object should have undefined symbols:
which would then be used by the linker to build the used field list. After https://go-review.googlesource.com/38409, they aren't there.
If it's useful, the full command I used for bisecting was
(cd src; GOEXPERIMENT=fieldtrack ./make.bash); bin/go tool compile -o fieldtrack.o fieldtrack.go; bin/go tool nm fieldtrack.o | grep go.track || exit 1
CC @josharian @mdempsky
The text was updated successfully, but these errors were encountered: