on gostd fork I get
go1.18.6 generate ./...
#
./gotypes.go:18:8: undefined: SwitchGoType
./gotypes.go:19:25: undefined: GoTypesVec
./gotypes.go:23:9: undefined: GoTypesVec
core/object.go:3: running "go": exit status 2
ok, I would need to try without an alias then.
Hmm, thanks, I’ll try to find time to look into that!
I wonder if the go command refers to a different version than go1.18.6, such that the Go std lib source code found by the tools/gostd/gostd tool is, e.g. Go 1.19? That might cause something like the above.
My workflow always involves ensuring that which go is not just an alias, but either a file or a symlink to a file that is the desired version of Go.
I haven’t tried Go 1.18 lately (I know it doesn’t work with Go 1.19 due to the std using newer language features). But I don’t think the way you’re running it will work – go generate can’t be run until after tools/gostd/gostd is run, as per the docs. I think the run.sh script (in that fork and on its gostd branch) should build it for you properly.
run.sh doesnt work for me with go1.18 (gostd branch, f1accf1f 3 weeks ago Regen Dash docs)
$alias go=go1.18.6
$ ./run.sh
std has changed, rebuilding...
#
./g_goswitch.go:1623:8: cannot use generic type "sync/atomic".Pointer[T any] without instantiation
./g_goswitch.go:3819:9: cannot use generic type "sync/atomic".Pointer[T any] without instantiation
./g_goswitch.go:5581:7: cannot use generic type "sync/atomic".Pointer[T any] without instantiation
core/object.go:3: running "go": exit status 2 what version does joker/gostd support - its 1.18?