Skip to content

wasm-opt: Fatal: invalid type: distinct rec groups would be identical after binary writing at index 287 #8519

Description

@Quafadas

This is a "vibe-coded", small scala-js project which compiles to WASM.

https://github.com/Quafadas/boid

Assuming, that it is not desirable to go through the hassle of setting up scala-cli etc to build, it, I've uploaded a zip of the wasm it emits.

target.zip

And at which I randomly decided to point wasm-opt at the wasm module it emits. That yielded the below.

simon@Simons-Mini-2 boid % wasm-opt /Users/simon/Code/boid/target/main.wasm -o arg.wasm
Fatal: invalid type: distinct rec groups would be identical after binary writing at index 287

My experience with the binaryen toolchain is very limited. I do not consider myself a confident operator of it, but I'm told this isn't supposed to happen... The error message itself, does not offer a hint as to whether there is a user-land solution, so whilst I'm not confident about exactly what I'm reporting, I hope that it does clear a threshold for reporting somthing, as the wasm appears useable, but wasm-opt doesn't like it.

Note: this ticket written by actual human.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions