-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Clarify import filtering logic and naming. #33986
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
[NFC] Clarify import filtering logic and naming. #33986
Conversation
@swift-ci test |
@swift-ci please test |
@swift-ci please clean test Windows |
@swift-ci please clean test Windows |
The Windows failure is because Windows doesn't support cross-repository testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was convinced at the first s/Public/Exported/
. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A definite improvement. (I think it’s this way because there was some thought that @_exported import
might eventually be spelled public import
when it became a supported language feature. But if that ever happens, we can cross that bridge when we get to it.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
af58ac7
to
62ed9c8
Compare
The lack of clarity manifested as unexpected behavior when using getImportedModules to create the module import graph. The new behavior makes SPI-ness and Shadowing-ness behave similarly in terms of filtering. We also check if a filter is well-formed to avoid accidental empty import lists.
62ed9c8
to
4b5d885
Compare
@swift-ci please test |
Ran into surprising behavior with
SourceFile::getImportedModules
when working on #33980, figured I should land this first.I don't understand why
ModuleFile::getImportedModules
doesn't have handling forSPI
/ShadowedByCrossImportOverlay
though, so I haven't touched it.