Avoid URI serialization issues in override completion by passing full text document identifier #72260
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.
An issue was caught by the vscode-csharp integration tests where override completion was broken with the latest roslyn on Windows. I'm not sure exactly when this regressed, but possibly related to changes made for xaml support.
I wasn't able to track down the exact cause - but on Windows the URI sent from the server in the completion resolve command is getting serialized as just the local path (e.g. not including the
file:///
part). The vscode client is expecting a URI string, and when it tries to deserialize, it fails.This inconsistency in serialization is likely because there's no explicit serializer for the
Uri
type defined, so it ends up being up to the whims of the serialization library. Instead, we should just pass theTextDocumentIdentifier
which already defines an explicit and consistent URI serializer.Requires client side change here - dotnet/vscode-csharp#6920