marmelroy / PhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
MIT License
5.16k stars 824 forks source link

Swift emits an invalid module interface when a public type has the same name as a module #755

Closed Alexandeer closed 6 months ago

Alexandeer commented 8 months ago

When building a library that depends on PhoneNumberKit, I receive warnings:

warning: public class 'PhoneNumberKit.PhoneNumberKit' shadows module 'PhoneNumberKit', which may cause failures when importing 'PhoneNumberKit' or its clients in some configurations; please rename either the class 'PhoneNumberKit.PhoneNumberKit' or the module 'PhoneNumberKit', or see https://github.com/apple/swift/issues/56573 for workarounds

I think no further clarification is required. I also want to notify that I observed a problem when the project did not understand definition like PhoneNumberKit.CountryCodePicker. There was an error with text like the PhoneNumberKit module does not contain CountryCodePicker (it is part of the PhoneNumberKit class). In short, Xcode confuses where the class is and where the module is.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

1ec5 commented 6 months ago

Darn, it’s still an issue…