Skip to content

Serialization: Tagged compilers should rebuild modules from swiftinterface under the resource-dir #68382

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
Sep 8, 2023

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Sep 7, 2023

There is some special logic for loading modules from under the resource-dir. In this case, if there's a swiftmodule next to the swiftinterface we refuse to rebuild the module from the swiftinterface. It was designed to catch misconfigurations, either locally if we forget to rebuild the stdlib from source or at deployement.

It has been causing issues recently with LLDB and other tools. Let's keep this behavior only for the local scenario by limiting it to untagged compilers. Leaving tagged/distributed compilers to rebuild more modules from the swiftinterface. This restriction aligns with the strict compiler tag check for swiftmodule compatibility which is applied by tagged compilers only.

@xymus xymus requested a review from tshortli September 7, 2023 20:35
@xymus xymus requested a review from artemcm as a code owner September 7, 2023 20:35
@xymus
Copy link
Contributor Author

xymus commented Sep 7, 2023

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Sep 7, 2023

CC @adrian-prantl @zixu-w

@tshortli
Copy link
Contributor

tshortli commented Sep 7, 2023

I think limiting the behavior to untagged compilers makes the most sense to me.

…e builds

There is some special logic for loading modules from under the
resource-dir. In this case, if there's a swiftmodule next to the
swiftinterface we refuse to rebuild the module from the swiftinterface.
It was designed to catch misconfigurations, either locally if we forget
to rebuild the stdlib from source or at deployement.

It has been causing issues recently with LLDB and other tools. Let's
keep this behavior only for the local scenario by limiting it to
untagged compilers. This restriction aligns well with the strict
compiler tag check for swiftmodule compatibility.
@xymus xymus force-pushed the serial-special-case-here branch from 03921e8 to 52f2cc3 Compare September 7, 2023 21:43
@xymus
Copy link
Contributor Author

xymus commented Sep 7, 2023

Updated it to use the compiler tag instead of debug vs release build.

@swift-ci Please smoke test

@xymus xymus changed the title Serialization: Rebuild modules from swiftinterface under the resource-dir in release builds Serialization: Tagged compilers should rebuild modules from swiftinterface under the resource-dir Sep 7, 2023
@adrian-prantl
Copy link
Contributor

Oh thank you, this is very useful!

@xymus xymus merged commit 0a3ca91 into swiftlang:main Sep 8, 2023
@xymus xymus deleted the serial-special-case-here branch September 8, 2023 14:56
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