Skip to content

[Frontend] Ignore adjacent swiftmodule in compiler host modules #66576

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
Jun 14, 2023

Conversation

bnbarham
Copy link
Contributor

lib/swift/host contains modules/libraries that are built by the host compiler. Their .swiftmodule will never be able to be read, ignore them entirely.

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

FWIW this came up in #66043. Macro tests are failing because they are built with the just-built compiler using modules from lib/swift/host. Those modules are built with the host compiler (so eg. 5.7) and thus the swiftmodule are not compatible with the just-built compiler, which is what we're using to build the macros. This doesn't happen right now because only the swift interfaces are copied from early-swiftsyntax.

Another solution would be to emit the modules in a separate directory and only emit the interfaces in lib/swift/host, which I could do, but that felt worse. Once we switch to 3.26 and remove these workaround functions to build swift libraries, that may also get a little more difficult.

Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good!

`lib/swift/host` contains modules/libraries that are built by the host
compiler. Their `.swiftmodule` will never be able to be read, ignore
them entirely.
@bnbarham bnbarham force-pushed the ignore-host-modules branch from 4db56da to ee3a47b Compare June 12, 2023 23:53
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@xedin xedin removed their request for review June 13, 2023 17:29
@bnbarham bnbarham merged commit 183902d into swiftlang:main Jun 14, 2023
@bnbarham bnbarham deleted the ignore-host-modules branch June 14, 2023 16:38
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.

2 participants