-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Frontend: Ignore resilient binary swiftmodules under usr/lib/swift #79588
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
@swift-ci Please smoke test |
🥳 |
Most SDKs use only swiftinterfaces under usr/lib/swift. Let's make sure we standardize this behavior and use only swiftinterface when they are present, even if there are also binary swiftmodule files available. Apply the same logic to SubFrameworks as well while we're at it. rdar://145316821
1fde577
to
f6ef819
Compare
@swift-ci Please smoke test |
Hi @xymus, bisect shows that this PR broke the Android build with the Windows toolchain. This is coming late, because we don't have test coverage for it in mainline CI yet. However, I can reproduce the issue with the PR linked below. Any ideas how to fix this? Does your change apply on Windows? Are binary swiftmodules resilient there? Let me know if you can recommend anything to try and I will look into it tomorrow. Thx Here's the error:
|
It looks like these modules are resilient / library-evolution-enabled from the flags I can see in the logs. There’s a This change applies to modules with swiftinterfaces under the It looks like building these swiftinterfaces failed because of a missing search path. Search paths aren’t written in swiftinterfaces whereas they can be written in swiftmodules depending on the configuration. I would expect that adding them in the command building the client, or as implied by the SDK search path as we do for I could as well add an exception to disable this change or the logic preferring swiftinterfaces on Windows. This logic has two goals, avoid issues with distributed swiftmodule files and make it more consistent how we import a module (always use the swiftinterface instead of using either the swiftmodule or the swiftinterface). I've seen these be more of a problem on Apple platforms. |
Thanks for the explanation. Search paths might be a good point. Revisiting the error message:
I found both of these dependencies in the android.modulemap, which ends up in the Anyway, I guess this is the right way forward. |
This happens to impact both Windows and Android as both require additional modulemaps to be injected via the VFS. The VFS overlays are not preserved nor are they recreated and thus resulting in the failure to find these modules. |
Most SDKs use only swiftinterfaces under usr/lib/swift. Let's standardize this behavior and use only swiftinterface when they are present, even if there are binary swiftmodule files available next to them.
Preserve the old behavior for the stdlib for faster build-times.
Apply the same logic to SubFrameworks as well while we're at it.
rdar://145316821