srdtrk / go-codegen

Generate Golang code for your CosmWasm smart contracts.
Apache License 2.0
23 stars 5 forks source link

Fix handling of duplicate type names #78

Open srdtrk opened 1 month ago

srdtrk commented 1 month ago

When two types have the same name, the codegen often breaks down. This likely requires a deep refactor of this messy code. See this schema file as an example: cw-ibc-lite-ics02-client.json

srdtrk commented 3 weeks ago

In case someone is here after running into this issue, I can give a suggestion. If two types have the same name, code should still be generated fine, but you may need to manually edit it to change the name of one of the structs (and wherever it is used) so that go compiles