Repository navigation
Use vscode-uri semantics for parsing URIs #83593
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
Changes from 43 commits
744e6c6
08909d5
9ef7108
f3d84df
ead2d19
6aa574e
40321c5
9decdb4
8eb7a81
1b0f9ac
9dcc5c1
3594cf5
3a17ec1
b3a209b
4653072
0ecea16
8d06111
db950c3
2f8ddb3
8521942
fd688e7
66280ca
c471ecf
45a232b
b0aeff4
250a4c2
96cbf76
c53703a
27e59cb
143076a
1a071a5
c69fdf7
9b46084
738ed07
c29c551
50d0e1b
984b85d
3081dba
b0f4631
300676c
e6e646e
d0b1786
e75762d
1b9efcd
d2bec4b
0ab110f
9eb6d8d
af638a5
b451175
8b63c47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -403,7 +403,7 @@ private void OnProjectInitializationComplete() | |
|
|
||
| private string GetRelativePath(DocumentUri documentUri) | ||
| { | ||
| var localPath = Path.GetFullPath(documentUri.GetRequiredParsedUri().LocalPath); | ||
| var localPath = Path.GetFullPath(documentUri.GetRequiredParsedUri().FsPath); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you consider using the old names? perhaps through extensions? making the diff simpler, then potentially having followup prs that remove the extensions? those prs would then be trivlally mechnical.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure - I'll try adding an extension and see how much it simplifies the diff (will get to that tmrw)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looked into this - it would remove ~6 locations from the diff, so I am not sure it's really necessary. Would be able to remove more if we also did ParsedDocumentUri, but can't do that as mentioned below. Doesn't seem to be a huge amount better, so unless you feel strongly plan on leaving it as-is. |
||
| var relativePath = PathUtilities.GetRelativePath(_workspaceRootPath, localPath); | ||
|
|
||
| Assert.False(PathUtilities.IsAbsolute(relativePath), $"Document URI is not under the workspace root: {documentUri}"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,8 @@ private static async Task AssertAutoLoadCompletedAsync(TestLspClient testLspServ | |
| Assert.NotNull(unit.CreateParams.Token.Value); | ||
|
|
||
| var end = await unit.WaitForEndAsync().WaitAsync(TestHelpers.HangMitigatingTimeout); | ||
| Assert.Equal(expectedEndMessage, end.Message); | ||
| // Progress messages can contain URIs whose canonical form changes casing, so compare them case-insensitively. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems a bit suspicious... |
||
| Assert.Equal(expectedEndMessage, end.Message, ignoreCase: true); | ||
|
dibarbet marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| private static async Task AssertProjectsLoadedAsync(TestLspClient testLspServer, int projectCount, bool assertInitialProgressReport = false) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if we're better off banning Uri.ctor or something so that way some of the static members on it you didn't have to suppress for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer banning the type to ensure any usage of it is justified (even if we get the System.Uri from someone else)