Skip to content

[Frontend] Ensure constraint solving runs salvaging #70129

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 1 commit into from
Dec 1, 2023

Conversation

bnbarham
Copy link
Contributor

When index-while-building is enabled, system modules are rebuilt from their interface with diagnostics silenced so failures are not propagated to the build. This is enabled via a local diagnostic engine that has no consumers.

Typechecking uses the lack of consumers to add
ConstraintSystemFlags::SuppressDiagnostics, which controls whether salvaging (and output of diagnostics) is run. There are cases today where salvaging can find a correct solution though, so we should ensure that it's always run.

This is a quick workaround for the indexing case - we should instead always run salvaging, regardless of whether diagnostics are suppressed or not.

Resolves rdar://117133297.

When index-while-building is enabled, system modules are rebuilt from
their interface with diagnostics silenced so failures are not propagated
to the build. This is enabled via a local diagnostic engine that has no
consumers.

Typechecking uses the lack of consumers to add
`ConstraintSystemFlags::SuppressDiagnostics`, which controls whether
salvaging (and output of diagnostics) is run. There are cases today
where salvaging can find a correct solution though, so we should ensure
that it's always run.

This is a quick workaround for the indexing case - we should instead
always run salvaging, regardless of whether diagnostics are suppressed
or not.

Resolves rdar://117133297.
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham merged commit 339d214 into swiftlang:main Dec 1, 2023
@bnbarham bnbarham deleted the index-salvage branch December 1, 2023 17:28
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.

2 participants