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

Fix LSP File watching so it correctly reports the baseUri if there's a trailing slash #73203

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

ryzngard
Copy link
Contributor

No description provided.

@ryzngard ryzngard requested a review from a team as a code owner April 24, 2024 00:02
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 24, 2024
@ryzngard ryzngard requested a review from dibarbet April 24, 2024 00:04
// found at https://github.com/microsoft/vscode/blob/9e1974682eb84eebb073d4ae775bad1738c281f6/src/vscode-dts/vscode.d.ts#L2226
// the baseUri should not end in a trailing separator, nor should it
// have any relative segmeents (., ..)
if (path[^1] == System.IO.Path.DirectorySeparatorChar)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every time we hand write some file path code, i die inside. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too... me too

Copy link
Member

@JoeRobich JoeRobich Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"".TrimEnd ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get out of here with your sense and logic. TBH I was just trying to avoid any allocations but I'm guessing trimend will be efficient enough

@ryzngard
Copy link
Contributor Author

@CyrusNajmabadi or @dibarbet PTAL

Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the tests!

@ryzngard ryzngard merged commit 3eefb58 into dotnet:main Apr 26, 2024
25 checks passed
@ryzngard ryzngard deleted the lsp_filewatcher_pathing branch April 26, 2024 21:06
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 26, 2024
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 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.

4 participants