-
-
Notifications
You must be signed in to change notification settings - Fork 594
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 Windows paths. #1662
Fix Windows paths. #1662
Conversation
bbf1dc1
to
240069e
Compare
I'm traveling and don't have a Windows machine at hand, but I was trying to fix Windows CI (#1266 (comment)), so I pushed two branches to see what would happen: |
Any update? |
@@ -200,7 +201,7 @@ export class VLS { | |||
|
|||
changes.forEach(c => { | |||
if (c.type === FileChangeType.Changed) { | |||
const fsPath = Uri.parse(c.uri).fsPath; | |||
const fsPath = getFileFsPath(c.uri); |
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.
Did you mean to change to getFilePath
? How is this change different than getFileFsPath
's implementation?
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.
It is unification of processing. In the future getFileFsPath will allow you to make unified fine-tuning(or fixing).
return Uri.parse(documentUri).path.slice(1); | ||
// vscode-uri use lower-case drive letter | ||
// https://github.com/microsoft/vscode-uri/blob/95e03c06f87d38f25eda1ae3c343fe5b7eec3f52/src/index.ts#L1017 | ||
return Uri.parse(documentUri).path.replace(/^\/[a-zA-Z]/, (s: string) => s.slice(1).toLowerCase()); |
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 change would only make drive letters lowercase for you...Does that fix your issue?
Or is your issue a bug on TS 3.7.3? See #1589 (comment) which includes some changes upstream that handles drive letters differently.
If upgrading to TS 3.7.5 (with vetur.useWorkspaceDependencies
) fixes your issue, then this isn't the correct fix.
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've tested this on Windows and it actually fixes my path issues I tested from master branch which includes ts 3.7.5 (message was vue-ls: Loaded bundled typescript@3.7.5). Without this line change, vetur didn't work.
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, rebasing on master and will release once CI goes through.
vscode-uri use lower-case drive-letter. So convert it always in getFilePath()
9ac38c6
to
71f555c
Compare
Thank you |
Thank you as well! |
vscode-uri use lower-case drive-letter. So convert it always in getFilePath()
Fixes #1316