-
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
Merged
varungandhi-apple
merged 1 commit into
swiftlang:master
from
varungandhi-apple:vg-doc-add-lexicon-module-builds
Jun 4, 2020
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,25 @@ written "dupe". Pronounced the same way as the first syllable of | |
A value whose type is a protocol composition (including a single protocol | ||
and *zero* protocols; the latter is the `Any` type). | ||
|
||
## explicit module build | ||
|
||
A module build where all dependency modules (including Clang modules) are | ||
passed to the compiler explicitly by an external build system, including | ||
any modules in caches. See also: [implicit module build](#implicit-module-build) | ||
and [fast dependency scanner](#fast-dependency-scanner). | ||
|
||
## fast dependency scanner | ||
|
||
A Swift compiler mode that scans a Swift module for import declarations and | ||
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). | ||
|
||
The fast dependency scanner outputs a graph of compilation steps which can be | ||
used by a build system to schedule | ||
[explicit module builds](#explicit-module-builds). | ||
|
||
## fragile | ||
|
||
Describes a type or function where making changes will break binary | ||
|
@@ -193,6 +212,17 @@ compared directly. | |
|
||
["if and only if"](https://en.wikipedia.org/wiki/If_and_only_if). This term comes from mathematics. | ||
|
||
## implicit module build | ||
|
||
A module build where the compiler is free to transparently build dependent | ||
modules (including Clang modules), and access modules in different caches as | ||
necessary. For example, if a textual Swift module (.swiftinterface file) for | ||
a dependency does not have a corresponding binary Swift module (.swiftmodulea | ||
file), the compiler 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 commentThe 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. |
||
|
||
## interface type | ||
|
||
The type of a value or declaration outside its generic context. These types | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.