New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using go-yaml/yaml fails with "(reflect.Type).Elem() called on map type" #2950
Comments
I just came here to report the same. It is triggered by gopkg.in/yaml.v2 aka https://github.com/go-yaml/yaml Here is output on my machine, tinygo 0.24:
tinygo 0.23:
|
The issue I have is triggered by this library too. We are using a forked version of |
Just tried with the new release v0.24.0 and got a similar error.
|
This is not unexpected. https://tinygo.org/docs/reference/lang-support/stdlib/ shows many standard library packages fail to pass tests due to reflect being incomplete in tinygo. And running https://github.com/go-yaml/yaml's tests in tinygo fails with:
|
As for the specific panic in this case, the we do not encode the map's full type into a side-table in the binary that would allow us to get the key and element types. |
The Running the
|
Thank you for working on this. I want to use tinygo to compile my app, but it heavily depends on that yaml library. Thank you for all your effort. I've been watching this thread, waiting to see this. |
This is part of the |
It seems tinygo's reflect package is not fully compatible with golang's native reflect package.
I have a golang program. It can be compiled to binary with
go build
. I tried to use tinygo to compile it to WASM, I run into the following issue:Stacktrace shows there is something wrong here.
The error message comes from here.
The text was updated successfully, but these errors were encountered: