Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Alexandeer opened this issue Mar 28, 2024 · 0 comments

Comments

@Alexandeer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant