Skip to content

[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

Conversation

varungandhi-apple
Copy link
Contributor

@varungandhi-apple varungandhi-apple commented Jun 3, 2020

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@nkcsgexi nkcsgexi left a 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).
Copy link
Contributor

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).
Copy link
Contributor

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.

@varungandhi-apple
Copy link
Contributor Author

For the points about:

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.

Please also mention the shortcomings of implicit module builds:

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 Typechecker.rst but say ModuleBuilds.md. I'm not working on that as part of this PR. I've filed rdar://63954246 to track that work.

@varungandhi-apple varungandhi-apple force-pushed the vg-doc-add-lexicon-module-builds branch from 0e48bf9 to 27bc171 Compare June 4, 2020 19:12
@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test

@varungandhi-apple varungandhi-apple merged commit 09ea5fd into swiftlang:master Jun 4, 2020
@varungandhi-apple varungandhi-apple deleted the vg-doc-add-lexicon-module-builds branch June 4, 2020 21:40
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.

None yet

2 participants