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

[ENHANCEMENT] - Support .code-workspace projects located on remotes #486

Closed
andrecavallari opened this issue Apr 8, 2021 · 5 comments
Closed
Labels
enhancement remote Remote Development
Milestone

Comments

@andrecavallari
Copy link

  • Extension version: Latest
  • VSCode version: 1.55.0
  • OS version: Ubuntu 20.10

Steps to reproduce

  1. Create a new project from a ssh server, add
  2. Add a new root directory
  3. Save the workspace, for example: my-project.code-workspace
  4. Save the project
  5. Try to use the workspace project

I saw that the rootPath for the project in file projects.json is being created with some white spaces and some line breakings (\n)

For example, the path: vscode-remote://ssh-remote+server/home/cavallari/dev/app.code-workspace will save in projects.json as vscode-remote://\n ssh-remote+server \n/home/cavallari/dev/roger.code-workspace

@alefragnani
Copy link
Owner

Hi @andrecavallari ,

The extension don’t support accessing .code-workspaces on remotes. If you need that, you must install the extension there. The way the extension works on remotes has been discussed in #323 .

But as suggested by @tyler36 in #487, and commented here, maybe it’s possible to transform the workspace path, IF it works similar to WSL.

Hope this helps

@alefragnani alefragnani added enhancement remote Remote Development and removed bug labels Apr 16, 2021
@alefragnani alefragnani changed the title [BUG] - When using SSH and a saved workspace, it's saving wrong root path [ENHANCEMENT] - Support .code-workspace projects located on remotes Apr 16, 2021
@andrecavallari
Copy link
Author

@alefragnani Hi, thanks for the reply.

It always worked fine here using a .code-workspace saved on remote server, it started crashing on latest updates.

After the new updates, it started saving the projects using .code-workspace like this:

{
  "name": "[SSH] - Roger GEM",
  "rootPath": "vscode-remote://\n                           ssh-remote+server\n                           /home/projects/roger.code-workspace",
  "paths": [],
  "group": "",
  "enabled": true
}

To fix this and get this project working corectly I need to edit the projects.json file and remove the whitespaces and \n in the code, converting to this:

{
  "name": "[SSH] - Roger GEM",
  "rootPath": "vscode-remote://ssh-remote+server/home/projects/roger.code-workspace",
  "paths": [],
  "group": "",
  "enabled": true
}

@alefragnani
Copy link
Owner

Hi @andrecavallari ,

That's weird (the error) and unexpected (to work this way) 😆 .

About the error, because nothing has changed (in the recent 12.1.0 release - April 4th) for any remote, other than Codespaces. I reinstalled version 12.0.0 (Nov 2020), and it saved the exact same erroneous path.

I could reproduce the error using WSL and Docker, and it appears to be happening for almost an year (based on logs).

The good new is, it should be fixed in the next release 😬

Thank you

@andrecavallari
Copy link
Author

@alefragnani, yes, it started about nov/dec 2020, I dont remember exactly when, but the project reference gets lost with this issue, I've produced the issue using an internal network based on Linux, didnt know WSL and Docker had same issue, but I am happy to know this will be fixed, and thank YOU for supporting this plugin, wich I consider one of the "must have" vs code plugins, and one of the most used by me

@alefragnani
Copy link
Owner

Thanks! I’m glad to know you like the extension 👍

@alefragnani alefragnani added this to the April 2021 milestone Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement remote Remote Development
Projects
None yet
Development

No branches or pull requests

2 participants