joker

Ben L 2022-09-29T09:24:17.497789Z

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
Ben L 2022-10-05T06:59:21.263379Z

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

👍 1
jcburley 2022-10-03T22:45:22.723739Z

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

jcburley 2022-10-03T23:04:11.238509Z

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.

jcburley 2022-09-30T13:21:07.452709Z

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 L 2022-10-02T05:02:54.342569Z

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

Ben L 2022-09-29T09:24:41.060249Z

what version does joker/gostd support - its 1.18?

👍 1