Fork me on GitHub
#joker
<
2022-09-29
>
Ben L09:09:17

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

👍 1
jcburley13:09:07

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.

Ben L05:10:54

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

jcburley22:10:22

Hmm, thanks, I’ll try to find time to look into that!

jcburley23:10:11

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.

Ben L06:10:21

ok, I would need to try without an alias then.

👍 1
Ben L09:09:41

what version does joker/gostd support - its 1.18?

👍 1