bytecodealliance / bytecodealliance/wit-bindgen

Go: Conflicts between identifiers

Open
#1,703 0 comments 0 reactions 0 assignees View on GitHub
gen-go
Dominant language
Rust
Stars
1.5k
Forks
286
Avg merge
6h 32m
Merged PRs (30d)
19

Description

While trying to compile Go bindings generated by `wit-bindgen` `0.61.1` for https://github.com/Pumpkin-MC/pumpkin-plugin-wit, I've run into issues with symbol conflicts. I've noticed two major categories:

------

```wit
variant my-variant {
tag
}
```

A variant with member `tag` will generate a getter `Tag` conflicting with the internal `Tag` (discriminator) of the variant itself.

------

```wit
record my-variant-item {
// ...
}
variant my-variant {
item(my-variant-item),
}
```

Having a record `XY` conflicts with the enum member produced for the tag for a variant `X` with case `Y`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.