-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[docs] Add module build related definitions to Lexicon. #32153
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
[docs] Add module build related definitions to Lexicon. #32153
Conversation
@swift-ci please smoke test |
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.
Thank you for adding these, Varun! I've adde some minor suggestions for enhancement.
resolves which modules will be loaded. It is based on the | ||
[clang-scan-deps](https://llvm.org/devmtg/2019-04/slides/TechTalk-Lorenz-clang-scan-deps_Fast_dependency_scanning_for_explicit_modules.pdf) | ||
library within Clang, for (Objective-)C modules, but is extended to also | ||
understand textual Swift modules (.swiftinterface files). |
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.
It may worth mentioning swift-driver provides APIs to digest the output of the scanner. This is to allow build systems to share more module building logics.
may transparently build a binary Swift module from the textual one as a cache | ||
for future compiler jobs, without involving any external build system that | ||
invoked the compiler. See also: | ||
[explicit module build](#explicit-module-build). |
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.
Please also mention the shortcomings of implicit module builds: because build systems have no way to control when and where these modules are built, sharing modules among different nodes for distributed build systems can be difficult.
For the points about:
I don't think the Lexicon is the right place to add these pieces of information. It should probably come in more long-form documentation, similar to |
0e48bf9
to
27bc171
Compare
@swift-ci please smoke test |
Adapted from Doug's post: https://forums.swift.org/t/explicit-module-builds-the-new-swift-driver-and-swiftpm/36990