This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Fix remote path bug (#2010)#3108
Merged
ramya-rao-a merged 2 commits intomicrosoft:masterfrom Mar 19, 2020
quoctruong:quoct/remote_path
Merged
Fix remote path bug (#2010)#3108ramya-rao-a merged 2 commits intomicrosoft:masterfrom quoctruong:quoct/remote_path
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
quoctruong:quoct/remote_path
Conversation
hyangah
reviewed
Mar 17, 2020
| if (/^(\w:[\\/]|\\\\)/.test(filePath)) { | ||
| return '\\'; | ||
| } | ||
| return filePath.includes('/') ? '/' : '\\'; |
Contributor
There was a problem hiding this comment.
Is there a possibility that the path has both / and ? The new change selects / in that case while the old findPathSeparator picks \ if it matches the above pattern (in line 758). Wonder if that would be potentially a problem.
| // than the local path separator (cross-compilation), | ||
| // the split and join logic won't work. | ||
| // See github.com/microsoft/vscode-go/issues/2010. | ||
| filePath = filePath.replace(/\/|\\/g, this.remotePathSeparator); |
Contributor
There was a problem hiding this comment.
wonder if it's doable to write some unit tests to check these path manipulation functions.
ramya-rao-a
reviewed
Mar 19, 2020
Co-Authored-By: Ramya Rao <ramya.rao.a@outlook.com>
ramya-rao-a
approved these changes
Mar 19, 2020
hyangah
added a commit
to hyangah/vscode-go-old
that referenced
this pull request
Mar 19, 2020
Sync @ 7da5077 * master: Address mismatch on path separators in debug config (microsoft#2010) (microsoft#3108) Include the link to release note/package overview in the update prompt, and update gopls default version (microsoft#3041) bug_report.md: Fix "architecture" typo. (microsoft#3095) telemetry.ts: send telemetry only if aiKey is not an empty string(microsoft#3091)
gopherbot
referenced
this pull request
in golang/vscode-go
Mar 20, 2020
Merge 'microsoft/vscode-go/master' into 'golang/vscode-go/master'
Sync @ 7da5077
* master:
Address mismatch on path separators in debug config (#2010) (#3108)
Include the link to release note/package overview in the update prompt, and update gopls default version (#3041)
bug_report.md: Fix "architecture" typo. (#3095)
telemetry.ts: send telemetry only if aiKey is not an empty string(#3091)
Change-Id: I727ef0ed3b8d1ad926e26831534c153b06070e64
GitHub-Last-Rev: d11e342
GitHub-Pull-Request: #11
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/224239
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
hyangah
added a commit
to hyangah/vscode-go-old
that referenced
this pull request
Mar 20, 2020
* master: goLanguageServer: set completion follow up command from middleware (microsoft#3084) Add stacktrace dump and better error messages on EXC_BAD_ACCESS panics (microsoft#2904) Address mismatch on path separators in debug config (microsoft#2010) (microsoft#3108) Include the link to release note/package overview in the update prompt, and update gopls default version (microsoft#3041) bug_report.md: Fix "architecture" typo. (microsoft#3095) telemetry.ts: send telemetry only if aiKey is not an empty string(microsoft#3091)
hyangah
added a commit
to hyangah/vscode-go-old
that referenced
this pull request
Mar 20, 2020
…sync microsoft/vscode-go@d53b1b3 * 'master' of https://github.com/microsoft/vscode-go: goLanguageServer: set completion follow up command from middleware (microsoft#3084) Add stacktrace dump and better error messages on EXC_BAD_ACCESS panics (microsoft#2904) Address mismatch on path separators in debug config (microsoft#2010) (microsoft#3108)
gopherbot
referenced
this pull request
in golang/vscode-go
Mar 20, 2020
Merge branch 'master' of https://github.com/microsoft/vscode-go@d53b1b3 * 'master' of https://github.com/microsoft/vscode-go: goLanguageServer: set completion follow up command from middleware (microsoft#3084) Add stacktrace dump and better error messages on EXC_BAD_ACCESS panics (microsoft#2904) Address mismatch on path separators in debug config (microsoft#2010) (microsoft#3108) Created by `git pull --no-ff --log upstream master` Change-Id: Id38768f3ec1bd01fa81325978f51f314fc1c08cb GitHub-Last-Rev: 3a8de3f GitHub-Pull-Request: #17 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/224240 Reviewed-by: Rebecca Stambler <rstambler@golang.org>
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is to fix #2010. When we are remote debugging cross-compiled binary on Windows, we are not respecting the separator that users use in
remotePathfield.