Skip to content

[5.5-05142021][Frontend] Do not output swiftinterface when there has been errors #37549

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

bnbarham
Copy link
Contributor

Cherry-pick #37523


When allowing errors with
-experimental-allow-module-with-compiler-errors, do not output the
.swiftinterface when there has been errors. There's no real need to
output them for invalid modules, so this avoids module interface
printing having to have checks for normally-impossible cases.

Resolves rdar://78039608.

When allowing errors with
-experimental-allow-module-with-compiler-errors, do not output the
.swiftinterface when there has been errors. There's no real need to
output them for invalid modules, so this avoids module interface
printing having to have checks for normally-impossible cases.

Resolves rdar://78039608.
@bnbarham bnbarham added the r5.5 label May 21, 2021
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please nominate

Explanation:
Background indexing now has its own build arena, where source is compiled with an option to allow outputting the .swiftmodule regardless of compiler errors. It was also outputting .swiftinterfaces, which can cause crashes due to unexpected (previously impossible) conditions - eg. when attempting to print an extension with an invalid extended nominal type. This change prevents outputting any supplementary outputs other than the ObjectiveC header when there have been errors, since they wouldn't be useful for indexing anyway.

Radar/SR Issue: rdar://78039608

Risk: Low. This change only affects the new index build arena and prevents supplementary output files from being output when there are errors.

Testing: Added a test case to check the supplementary files are no longer output.

@tkremenek tkremenek merged commit fcbd593 into swiftlang:release/5.5-05142021 May 21, 2021
@bnbarham bnbarham deleted the beta-1-cherry-rdar78039608 branch May 21, 2021 06:46
@bnbarham bnbarham changed the title [Beta-1][Frontend] Do not output swiftinterface when there has been errors [5.5-05142021][Frontend] Do not output swiftinterface when there has been errors May 21, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants