Fix for FixAll in project and solution scopes for non-C#/VB projects #67650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
F# team identified a bug in FixAll support where in FixAll works fine for Document scope, but doesn't work for Project and Solution scope. The core issue is in FixAllContextHelper code path for these scopes, where we reverse map from diagnostic location to source document. Existing code was assuming the diagnostic location has an associated source syntax tree, which is only true for C# and VB. We now handle diagnostics with external locations that map back to source documents in non-C#/VB world.
I manually verified that this fixes the F# FixAll scenario. I spent some time investigating writing an F# FixAll unit test, but that seems to have lot of missing pieces. Instead, I have requested F# team to add a FixAll unit test or integration test in their repo once this fix flows to them.