-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow specifying a .code-workspace file via Devfile #22218
Comments
Setting That said I am not sure if specifying a VS Code workspace file is the right approach:
Other alternatives when there are more than one project:
@azatsarynnyy what do you think? I believe you worked on something similar for Theia at the time. |
.code-workspace
file via devfile
Those solve the problem of viewing all projects by default. However, I think there's still value in specifying an existing workspace file. Since it's an annotation, we wouldn't expect it to work if you're not using Code. Perhaps that's a separate issue to solve? |
++1 on this request. Here's an example project with multiple repos: https://github.com/eclipse-che-demo-app/che-demo-app.git |
I'd add a bit of history of the topic to the context ) Considering the latest update:
now, it's time to reconsider again the approach of opening the project(s) sources in Che Code 🙂
Despite the fact that it looks like a simplest and right solution, it brings a lot of problems. I remember experimenting with that and it turned out that it breaks even some basic UXes. For example:
So, I wouldn't use
I agree that it would be the best solution. Actually, we need to reimplement the logic, we used to have in the TS extension, to have it in Che-Code entrypoint. |
We also need to ensure that we cover the use case where a |
Just our 2 cents here. Most of our workspaces are multi root projects so the mono repo approach caused some challenges to our dev workflow. We ended up running a patched devworkspace operator that sets PROJECT_SOURCE pointing to /projects. Out of convenience we usually have a bootstrap event that clones additional repos and sets workspace settings, tasks and plugins (this may be the reason we are not facing the issues @azatsarynnyy mentions above) This works fine for us (no problems with vscode plugins and developers have a great UX) but we'd love to see multi-root projects natively supported 👍 |
I have created a PR to support loading a vscode workspace file at startup through an env variable: schemaVersion: 2.2.0
(...)
components:
- name: dev-tools
container:
(...)
env:
- name: VSCODE_DEFAULT_WORKSPACE
value: "/projects/che-demo-app/che-demo.code-workspace" The environment variable should be set in the container that hosts VS Code (the first component or the component with attribute As an example I have used @cgruver repo and added the env variable. For Che 7.64 or higher and Dev Spaces 3.6 or higher I have a gist with a VS Code spec (uses image
|
@l0rd This works great! I set |
@l0rd @KevinMGranger It looks like this feature made it into I think we can close this now. |
🎉🎉🎉 |
I have renamed this issue with it's original title and opened another issue for the case when the workspace file doesn't exist: #22280 |
Is your enhancement related to a problem? Please describe
Our project repos contain a
.devfile.yaml
, and sometimes a$SOMETHING.code-workspace
file. If using a devfile that clones multiple projects, then the code-workspace file is necessary to open them all in the same window.It's annoying to tell users to open that file and manually click "open workspace". It also takes additional time to reload the editor.
Describe the solution you'd like
Allow specifying a code-workspace file to open by default via an attribute in the devfile.
Describe alternatives you've considered
?workspace=$SOMETHING.code-workspace
in the workspace URL, but not at creation timeAdditional context
A minimalist example of how it might work:
.devfile.yaml
:something.code-workspace
:The text was updated successfully, but these errors were encountered: