Skip to content
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

Open
alexcasalboni opened this issue Feb 21, 2025 · 3 comments
Open

Missing shapes in generated code using wasm-tools v1.226.0 #297

alexcasalboni opened this issue Feb 21, 2025 · 3 comments

Comments

@alexcasalboni
Copy link

alexcasalboni commented Feb 21, 2025

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:

# wit/deps.toml
edgee = "https://github.com/edgee-cloud/edgee-wit/archive/refs/tags/v0.5.0.tar.gz"
cli = "https://github.com/WebAssembly/wasi-cli/archive/refs/tags/v0.2.0.tar.gz"
// wit/world.wit
package edgee:native;

world data-collection {
  include wasi:cli/imports@0.2.0;
  export edgee:components/data-collection;
}

Generate with:

go run go.bytecodealliance.org/cmd/wit-bindgen-go generate -o internal/ ./wit

Check the file internal/edgee/components/data-collection/abi.go - there should be a type called EdgeeRequestShape but it's not there.

@alexcasalboni
Copy link
Author

FYI @alexcrichton @yoshuawuyts @cpetig

@alexcrichton
Copy link
Member

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.

@alexcasalboni
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants