-
Notifications
You must be signed in to change notification settings - Fork 13
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
Missing shapes in generated code using wasm-tools v1.226.0 #297
Comments
While I can't say for certain this is likely related to bytecodealliance/wasm-tools#2050 which changed the JSON output structure and may not be supported here yet. |
Thanks! That sounds odd because the generation would fail entirely or report some kind or error, while it succeeds and only some of the types/shapes are missing. Also, I think that ideally this repository could set and maintain its own wasm-tools dependency/version, instead of relying on what is installed on the system (since there could be breaking changes like this one). Anyways, any pointer to where the issue might be in this repository? I’d love to contribute with a fix. |
I'm hitting this as well, mostly as an artifact that my exported functions no longer generate result types. For example, with my WIT: package example:bug;
interface foo {
record request {
headers: list<tuple<string, list<string>>>,
}
record response {
headers: list<tuple<string, list<string>>>,
}
funky: func(request: request) -> response;
}
world bar {
export foo;
}
Then generated with // Code generated by wit-bindgen-go. DO NOT EDIT.
package foo
// Exports represents the caller-defined exports from "example:bug/foo".
var Exports struct {
// Funky represents the caller-defined, exported function "funky".
//
// funky: func(request: request) -> response
Funky func(request Request) (result Response)
} and with wasm-tools // Code generated by wit-bindgen-go. DO NOT EDIT.
package foo
// Exports represents the caller-defined exports from "example:bug/foo".
var Exports struct {
// Funky represents the caller-defined, exported function "funky".
//
// funky: func(request: request)
Funky func(request Request)
} Hoping that the minimal example helps in diagnosing the issue 🙏🏻 |
Everything worked well until a couple of days ago (with
[email protected]
).With the latest wasm-tools, our generated code is missing some shapes.
Failing GitHub Action here: https://github.com/edgee-cloud/example-go-component/actions/runs/13455120736/job/37597335001?pr=7
How to reproduce:
Generate with:
Check the file
internal/edgee/components/data-collection/abi.go
- there should be a type calledEdgeeRequestShape
but it's not there.The text was updated successfully, but these errors were encountered: