-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Correct discrepancies in the package interface file lookup. #75160
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
Conversation
Add a check for the client side flag which explcitly opts in to loading the package interface, besides whether package-name is empty or in the same package. rdar://131393508
@swift-ci smoke test |
@cachemeifyoucan Could you confirm these lines still belong to the same enclosing if block that's now modified (L672)?
|
I feel like the correct behavior for a client in the same package is to load the binary module if package interface should not be loaded, not fallback to public/private interface, isn't it? |
The change is part of |
The difference is that if an interface is found (depending on the priority of the loading order for binary vs. interface), binary module will not be attempted to be loaded. Thus this function actually partially decide if binary module should be used or not in certain situations.
As long as you think it is ok to fall back to public/private interface, risking not finding the package specific interfaces, this change is good to me. |
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.
Can you please add a test?
@swift-ci smoke test |
It can return null in certain situations as you have added per
Requiring the client flag (to load package interface) for finding the path for the package interface makes it less error-prone, since otherwise client without the client flag can't even load that package even if the interface found is the package interface. Note that |
Add a check for the client side flag which explcitly opts in to loading the package interface, besides whether package-name is empty or in the same package.
rdar://131393508