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

"Duplicate Workspace in New Window" just creates new window and opens workspace.json file #102148

Closed
ryanjkelly opened this issue Jul 10, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release regression Something that used to work is now broken verified Verification succeeded windows VS Code on Windows issues workbench-multiroot Multi-root (multiple folders) issues

Comments

@ryanjkelly
Copy link

  • VSCode Version: 1.47
  • OS Version: Windows 10 Home (2004, 19041.329)

Steps to Reproduce:

  1. Open workspace
  2. Duplicate Workspace in New Window

Does this issue occur when all extensions are disabled?: Yes

This happens on both v1.47 and v1.48.0 (Insiders). I downgraded to v1.46.1 and it is working correctly there.

One other thing to note is that when I exit VSCode and reopen it, the duplicated workspaces open correctly. Here's a screencast showing the behavior:

vscode-duplicate-workspace-bug

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities regression Something that used to work is now broken windows VS Code on Windows issues labels Jul 11, 2020
@bpasero bpasero added this to the July 2020 milestone Jul 11, 2020
@bpasero
Copy link
Member

bpasero commented Jul 11, 2020

I can reproduce but only on Windows for some reason. Clearly a regression and up for help if someone wants to drill in. E.g. start with a git bisect to understand which commit triggered this during the 1.47 development timeframe 👍

@bpasero bpasero assigned jrieken and unassigned jrieken Jul 11, 2020
@bpasero
Copy link
Member

bpasero commented Jul 11, 2020

A regression from 5ebae68803 where we stopped ignoring case for isEqualOrParent on Windows. Bottom line, this is a drive letter casing issue only on Windows where we are unable to understand that the untitled workspace path is inside untitled workspace home folder (from isUntitledWorkspace)

I wonder if resources.ts should explicitly ignore the case of the drive letter because it is relatively easy to get into a state where a URI ends up having the lowercase form. For example:

  • take a URI with uppercase drive letter
  • pass it around, use URI.fsPath
  • construct it again via URI.file
  • you can no longer compare both URIs due to drive letter case differences

//cc @jrieken

@bpasero bpasero removed the help wanted Issues identified as good community contribution opportunities label Jul 11, 2020
@bpasero bpasero added the workbench-multiroot Multi-root (multiple folders) issues label Jul 11, 2020
@bpasero bpasero added the candidate Issue identified as probable candidate for fixing in the next release label Jul 12, 2020
@bpasero bpasero modified the milestones: July 2020, June 2020 Jul 12, 2020
@bpasero bpasero reopened this Jul 12, 2020
@bpasero bpasero modified the milestones: June 2020, June 2020 Recovery Jul 12, 2020
@bpasero bpasero mentioned this issue Jul 13, 2020
@jrieken
Copy link
Member

jrieken commented Jul 13, 2020

I wonder if resources.ts should explicitly ignore the case of the drive letter because it is relatively easy to get into a state where a URI ends up having the lowercase form

We actually would do that when using fsPath or toString - since they normalize the driveletter casing. My refactorings didn't change the original implementations and they use a different fsPath-variant, see originalFSPath-usage. @aeschli would know why that has been done.

bpasero added a commit that referenced this issue Jul 13, 2020
@bpasero bpasero closed this as completed Jul 13, 2020
@joaomoreno joaomoreno added the verified Verification succeeded label Jul 13, 2020
@vinayg-me
Copy link

Thanks a lot for fixing this issue.
It is part of my muscle memory, and was getting irritated with the bug.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release regression Something that used to work is now broken verified Verification succeeded windows VS Code on Windows issues workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

6 participants
@joaomoreno @bpasero @jrieken @ryanjkelly @vinayg-me and others