outfoxx / swiftpoet

Kotlin and Java API for generating .swift source files.
Apache License 2.0
277 stars 26 forks source link

Correctly disambiguate conflicting type names between the module itself and external modules. #111

Closed dnkoutso closed 5 months ago

dnkoutso commented 6 months ago

If a type exists within a module that is being used by it and the same type exists in another module we do not properly disambiguate between them.

That is because we only keep track of referenceTypeNames that include a moduleName. This change collects the types used by the same module and properly disambiguates.

dnkoutso commented 5 months ago

Tested Wire with this change and our internal monorepo and its ✅ ✅ ✅