This repository was archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
Fix workspace path when multiProjectSetup is enabled #759
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8f8aa8f
fix incorrectly stripping the root workspace folder
jannickj 1890d87
fix completely incorrect use of parse (by me)
jannickj 16d594b
pattern was not picked up by windows.
jannickj d34dff9
change the name to just be the unix format path
jannickj 954edc6
fix bug where commands would be re-registered on restart
jannickj bffee19
fix grammar mistake
jannickj 5be2fe3
fix bug where it was checking against double stripped
jannickj 19cdaef
give the fake workspace the name of the folder it's acting as workspa…
jannickj 4581581
set cwd to be the workspace folder, fixes cargo build command for "en…
jannickj 12378b1
apply prettifier
jannickj 1a761d8
undo collectionName change
jannickj 65480c5
apply hack only to windows + add clarifying comment
jannickj 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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.
So I'm still wondering about this change... What exactly is the output for both
.path
and.fsPath
and why do we need to prefix that with a wildcard?Is the wildcard supposed to make the pattern drive-letter-agnostic, e.g. it'd match both
C:\Some\Path
andD:\Some\Path
with a**/some/path/**
pattern?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.
right that's a really good point.
for fsPath it's what you would expect just standard operative system paths
windows:
c:\Some\Path
linux:
/some/path
path is what is interesting (it's basically the path part of a FILE uri):
windows:
/c:/Some/Path
with the file uri:file:///c:/Some/Path
linux:
/Some/Path
with the file uri:file:///Some/Path
Now the pattern matcher uses file uri paths for matching, my guess is they wanted to have a OS agnostic pattern matcher.
The
**
is because windows puts something else infront of the files when matching and I have no clue what however the only way to get around it was**
which will catch it.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.
Maybe a better solution would be to only apply this for windows
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.
Thanks for clarifying! What do you mean by something else? Do you mean like
c%3A
(which is percent-encodedc:
)?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.
No, I meant they put something
[something]/c:/...
I don't know what that something is and I couldn't figure it out, I thought it was fine however but I understand wanting to fix it the correct way :).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.
So I did some digging around vscode and vscode-languageserver-node and it seems this should also accept
RelativePattern
, which encapsulates better what we want to achieve. The typings, however, only acceptstring
, so I'd be fine landing this as-is :)