Skip to content

[CSSolver] Don't re-run solver to diagnose ambiguities #66036

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 19, 2023

If ambiguity has been detected during normal solving,
let's diagnose that right away instead of re-running
the solver in diagnostic mode because it would produce
exactly the same set of solutions (all solutions with
fixes added in diagnostic mode would be filtered out
because they'd have worse scores).

@xedin xedin requested a review from hborla as a code owner May 19, 2023 22:51
@xedin
Copy link
Contributor Author

xedin commented May 19, 2023

While working on #66035 I noticed that salvage mode gets run before diagnosing ambiguities which just does double the work to produce the same result and that the list of solutions doesn't get minimized if normal mode cannot find a single best solution which means that we could sometimes produce invalid code completion results.

If ambiguity has been detected during normal solving,
let's diagnose that right away instead of re-running
the solver in diagnostic mode because it would produce
exactly the same set of solutions (all solutions with
fixes added in diagnostic mode would be filtered out
because they'd have worse scores).
@xedin xedin force-pushed the solver-ambiguity-handling branch from 6458565 to 3bb865d Compare May 22, 2023 16:01
@xedin
Copy link
Contributor Author

xedin commented Jun 10, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 10, 2023

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Jun 23, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 23, 2023

@swift-ci please test source compatibility

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