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

Offer user a way to enter a workspace if detecting a workspace file #45749

Closed
weinand opened this issue Mar 14, 2018 · 10 comments
Closed

Offer user a way to enter a workspace if detecting a workspace file #45749

weinand opened this issue Mar 14, 2018 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan workbench-multiroot Multi-root (multiple folders) issues

Comments

@weinand
Copy link
Contributor

weinand commented Mar 14, 2018

I receive more and more issues where the reproducible steps assume a multi-root setup with a single folder and a workspace file in this folder.

Since the reproducible steps typically don't explain how to open the project in VS Code I just open the folder. As a consequence I'm missing all workspace settings and launch.configs which makes it difficult to reproduce the issue at hand.

After some interaction with the issue's author we figure out that I was supposed to open the project via the workspace file.

Could we add some smartness to VS Code's "Open Folder" action that warns about this situation and offers me to open the workspace file instead?

/cc @isidorn

@bpasero
Copy link
Member

bpasero commented Mar 14, 2018

@weinand to be clear, you expect a warning to show up whenever a user opens a folder where there is 1-N workspace files top level in that folder?

@bpasero bpasero added the info-needed Issue requires more information from poster label Mar 14, 2018
@weinand
Copy link
Contributor Author

weinand commented Mar 14, 2018

I'm expecting a warning if a user opens a folder in VS Code that contains a file "*.code-workspace". The warning would have two options:

  • continue opening the folder
  • opening the workspace via the "*.code-workspace" file.

@DanTup
Copy link
Contributor

DanTup commented Mar 14, 2018

This is a similar request to discussed here:

#45399 (comment)

I would love this. If someone has gone to the effort of maintaining a code-workspace in a repository (which is somewhat required for some debugging scenarios) it'd be nice if others opening the folder got a prompt about it.

I suggested it could exist in the .vscode folder but the placement isn't critical.

(FWIW, I don't think it should be a warning - just an offer, like the recommended extensions @bpasero mentioned in the comment linked above).

@weinand
Copy link
Contributor Author

weinand commented Mar 14, 2018

@bpasero #45657 (comment) is the latest case where I ran into this problem.

@bpasero bpasero added feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues and removed info-needed Issue requires more information from poster labels Mar 14, 2018
@bpasero bpasero removed their assignment Mar 14, 2018
@bpasero bpasero changed the title VS Code could warn if "Open Folder" is used but a workspace file exists Offer user a way to enter a workspace if detecting a workspace file Mar 14, 2018
@bpasero
Copy link
Member

bpasero commented Mar 14, 2018

I have renamed this, I think there are multiple cases where we could offer to open the workspace:

  • user accidentally opens a workspace file as file and not as workspace
  • user opens a folder with 1 workspace file inside
  • user opens a folder with N workspace files inside (then we should show a picker)

@DanTup
Copy link
Contributor

DanTup commented Mar 14, 2018

Sounds great to me :-)

@bpasero bpasero self-assigned this Sep 24, 2018
@bpasero bpasero added this to the September 2018 milestone Sep 24, 2018
@bpasero
Copy link
Member

bpasero commented Sep 24, 2018

I decided to not do anything for now when the workspace file is opened explicitly. But for the other cases:

Single Workspace File
image

Multiple Workspace Files:
image

Happy for feedback on the wording.

@DanTup
Copy link
Contributor

DanTup commented Sep 24, 2018

Looks good to me - does it only look in the root folder that was opened, or does it look in .vscode/ too? (It'd be nice to support both since some projects wont want IDE-specific files like this in their root)

@bpasero
Copy link
Member

bpasero commented Sep 24, 2018

@DanTup yeah I forgot to mention: it only supports code-workspace files in the root currently. I was not aware that projects would also add workspace files in different places. Is that a pattern you have seen?

@DanTup
Copy link
Contributor

DanTup commented Sep 24, 2018

I haven't seen many projects use workspaces yet (maybe in part because of the lack of this) but I have seen projects that try to avoid IDE-specific files (esp. if the maintainers use many different IDEs). It'd be much easier to have this extra file accepted if it was in the folder with all the other vscode files (I'd also have a personal preference to put mine in there because the root is already a bit bloated with Travis, AppVeyor, tslint, tscobfig, several npm files, etc! :(

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

3 participants