-
Notifications
You must be signed in to change notification settings - Fork 579
Fixed: [bug/lsp]panic: vfs: path is not absolute #670 #671
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
Open
rezwanahmedsami
wants to merge
5
commits into
microsoft:main
Choose a base branch
from
rezwanahmedsami:tsconfigoptions_empty_path_handler
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f5d52b1
Fixed: [bug/lsp]panic: vfs: path is not absolute #670
rezwanahmedsami a5b4edf
Merge branch 'main' into tsconfigoptions_empty_path_handler
rezwanahmedsami 01d265f
Merge branch 'main' into tsconfigoptions_empty_path_handler
rezwanahmedsami 6ee2b02
updated
rezwanahmedsami 98b97a3
Merge branch 'main' into tsconfigoptions_empty_path_handler
rezwanahmedsami File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
This is also not what the original code said.
A real fix needs to find the actual place where an empty string check is happening, not keep shifting it back and back...
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.
okay, then i have to check it in details. Okay i will take a look
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.
@rezwanahmedsami maybe the problem is in
GetNormalizedAbsolutePath
so If basePath (passed to GetNormalizedAbsolutePath) is empty or relative, the combined path may still be relative. Example:
GetNormalizedAbsolutePath("config.json", "") -> returns "config.json" (relative)
so maybe we need to garentee it's basePath is always absolute
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.
@rezwanahmedsami try this code:
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 think your code looks great but still Even with GetNormalizedAbsolutePath, invalid paths could still enter the maps. Add absolute path validation before inserting into maps:
also I think there is no need for empty string checks in order to match javascript concatination
this is just a suggestion WDYT? @gabrielluizsf
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.
let's check with the others @rezwanahmedsami and @jakebailey
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.
@rezwanahmedsami the @waelantar code looks really cool
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.
well your implementation is great i just gave small suggestions
but I feel like this is abandoned PR so if they didn't respond soon maybe you should create a new one and please send me the link here so I can see the updates
and thank you
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.
ok
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.
#738