Skip to content

skip implicit clang decls in the duplicate-decl assertion #41115

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

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

QuietMisdreavus
Copy link
Contributor

Resolves SR-15801

The "duplicate decls" assertion added in #40810 (and re-added in #40860) trips on modules that re-export multiple modules that themselves have underlying Clang modules. This is because of decls added implicitly by Clang, such as __NSConstantString. These duplicate decls should be harmless to leave in, since they are usually filtered out by consumers of getDisplayDecls anyway.

I'm not totally sure this is the right approach, but these decls aren't as clear-cut as "importing multiple copies of the same underlying module", so i'm posting this as a potential solution and i would like to run as many tests as possible to make sure that my assumptions are correct.

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test source compatibility

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

@QuietMisdreavus
Copy link
Contributor Author

Source compatibility seems to be an issue on the CI builder, and/or an issue in SwiftPM. Trying with the SwiftPM fix...

swiftlang/swift-package-manager#4075

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Feb 2, 2022

macOS Toolchain
Download Toolchain
Git Sha - 46f6b72

Install command
tar -zxf swift-PR-41115-1333-osx.tar.gz --directory ~/

@QuietMisdreavus
Copy link
Contributor Author

cc @slavapestov since you reviewed the past patches in this series

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test source compatibility

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test macOS

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

Successfully merging this pull request may close these issues.

3 participants