Skip to content
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

Call GetURI when getting a URI for a document #71395

Conversation

jasonmalinowski
Copy link
Member

@jasonmalinowski jasonmalinowski commented Dec 21, 2023

We had some code that slipped in that was calling ProtocolConversions.CreateAbsoluteUri(document.FilePath), which is fine for regular documents but skips the special handling around source generated files, so we'd break in those cases.

This "fixes" the UriFormatExceptions people are getting, in the sense that you won't get a UriFormatException anymore. If you try to actually go to a source generated document, that'll still be broken until we merge dotnet/vscode-csharp#5858, but at least this means something like a find reference won't completely break if it has a location somewhere in a source generated file.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1922993

We had some code that slipped in that was calling
ProtocolConversions.CreateAbsoluteUri(document.FilePath), which is fine
for regular documents but skips the special handling around source
generated files, so we'd break in those cases.

This "fixes" the UriFormatExceptions people are getting, in the sense
that you won't get a UriFormatException anymore. If you try to actually
go to a source generated document, that'll still be broken until we
merge dotnet/vscode-csharp#5858, but at least
this means something like a find reference won't completely break if
it has a location somewhere in a source generated file.
@jasonmalinowski jasonmalinowski self-assigned this Dec 21, 2023
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner December 21, 2023 21:36
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 21, 2023
@jasonmalinowski jasonmalinowski merged commit 182e829 into dotnet:main Dec 22, 2023
28 checks passed
@jasonmalinowski jasonmalinowski deleted the fix-uri-creation-errors-for-generated-documents branch December 22, 2023 05:45
@ghost ghost added this to the Next milestone Dec 22, 2023
@Cosifne Cosifne modified the milestones: Next, 17.9 P3 Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants