Skip to content

NFC: Update lit.cfg to specify -parse-as-library for module interface tests #67838

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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 9, 2023

Tests that use the %target-swift-emit-module-interface lit substitution are designed to test the behavior of the compiler when emitting module interfaces for resilient libraries. It therefore makes sense to pass -parse-as-library by default for these frontend invocations.

Fixes a few tests that were accidentally depending on parsing source files as top level code.

… tests.

Tests that use the `%target-swift-emit-module-interface` lit substitution are
designed to test the behavior of the compiler when emitting module interfaces
for resilient libraries. It therefore makes sense to pass `-parse-as-library`
by default for these frontend invocations.

Fixes a few tests that were accidentally depending on parsing source files as
top level code.
@tshortli
Copy link
Contributor Author

tshortli commented Aug 9, 2023

@swift-ci please smoke test

@tshortli tshortli requested a review from elsh August 9, 2023 21:26
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.

This makes sense to me.

@tshortli tshortli merged commit 9f48b37 into swiftlang:main Aug 10, 2023
@tshortli tshortli deleted the parse-as-library-module-interface-tests branch August 10, 2023 00: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.

4 participants