Skip to content

Frontend: Introduce -experimental-serialize-external-decls-only option #68166

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 4 commits into from
Aug 29, 2023

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 28, 2023

This option is designed to be used in conjunction with -experimental-lazy-typecheck and -experimental-skip-all-function-bodies when emitting a resilient module. The emitted binary module should contain only the decls needed by clients and should contain roughly the same contents as it would if the corresponding swiftinterface were emitted instead and then built.

This functionality is a work in progress. Some parts of the AST may still get typechecked unnecessarily. Additionally, serialization does not trigger the appropriate typechecking requests for some ASTs and then fails due to missing types.

Resolves rdar://114230586

@tshortli tshortli requested a review from xymus August 28, 2023 16:55
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.

That's beautiful to see!

@tshortli tshortli force-pushed the emit-module-lazy-typecheck branch from 2c083ef to 418ae3b Compare August 28, 2023 21:47
@tshortli tshortli requested a review from artemcm as a code owner August 28, 2023 21:47
@tshortli tshortli force-pushed the emit-module-lazy-typecheck branch from 418ae3b to ce42f99 Compare August 28, 2023 21:52
This option is designed to be used in conjunction with
`-experimental-lazy-typecheck` and `-experimental-skip-all-function-bodies`
when emitting a resilient module. The emitted binary module should contain only
the decls needed by clients and should contain roughly the same contents as it
would if the corresponding swiftinterface were emitted instead and then built.

This functionality is a work in progress. Some parts of the AST may still get
typechecked unnecessarily. Additionally, serialization does not trigger the
appropriate typechecking requests for some ASTs and then fails due to missing
types.

Resolves rdar://114230586
@tshortli tshortli force-pushed the emit-module-lazy-typecheck branch from ce42f99 to 430cd58 Compare August 29, 2023 04:22
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli merged commit 6de8597 into swiftlang:main Aug 29, 2023
@tshortli tshortli deleted the emit-module-lazy-typecheck branch August 29, 2023 14:16
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