-
Notifications
You must be signed in to change notification settings - Fork 64
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
Root folders for projects #385
Comments
you don't want to use generic attributes in |
I would prefer to have that part of the devfile schema |
@sunix what's the use case for the empty project root: - name: nodejs-ex-sunix
git:
location: 'https://github.com/sunix/nodejs-ex'
roots: [] The project gets cloned in |
@l0rd yes. It should not happen very often, but it is to clarify the behavior if it happens. |
I would not supporting this use case (maybe with an attribute?). And when Another comment is that having both |
OK
I don't think we should deprecate
|
I think that for quarkus-quickstarts we mainly want to see one project in the IDE but having other quickstarts there could be helpful as well as you may want to open them |
Based on cabal discussion, we'll:
|
I am surprise that odo wouldn't use these kind of meta informations about projects/roots. For git repos that contain several projects in subfolders, this is a generic way to tell where the projects are. |
@kadel Does Odo care about the project subfolders? The entire git repo will be cloned including the subfolders. |
Why complicate it with roots? projects:
- name: quarkus-reactjs
git:
location: 'https://github.com/redhat-developer-demos/quarkus-reactjs-postit-app'
commands:
- id: build-frontend
exec:
component: nodejs
commandLine: "npm install"
workingDir: ${PROJECTS_ROOT}/node-frontend
- id: build-backend
exec:
component: java
commandLine: "mvn package"
workingDir: ${PROJECTS_ROOT}/quarkus-backend Then I can go further and even create a composite command to build both. - id: build-all
composite:
commands:
- build-frontend
- build-backend
group:
kind: run
isDefault: true |
odo currently doesn't use |
OK fair enough :) |
I think that we should discourage people from using multi-project devfiles. From Che's point of view, one devfile should represent one workspace. Multi-workspaces shoudl be represented as opening multiple devfiles. |
I think we should not encourage nor discourage people to use one pattern or another. |
Agreed that this needs to be flexible to work with the existing projects no matter what is their structure. But at the same time we need to guide new users and establish best practices.
This is true and possible only for small projects. Most of the developers won't work on the backend and frontend at the same time. Most of the time they won't be even maintained by the same development teams. Establishing the best practice where each service has its own devfile is important. This is how most of the developers that we target operate. |
Is your feature request related to a problem? Please describe.
At the moment, the devfile declares
projects
that are usually git projects. These git projects are actually git repository. In these git repos, it happens that projects to be loaded in an IDE are actually located in subfolders of the git repo.For instance: https://github.com/redhat-developer-demos/quarkus-reactjs-postit-app should have
node-frontend
andquarkus-backend
loaded asProject
(Eclipse IDE terminology) orWorkspace root
(VSCode/Theia/Che terminology).These
projects
orroots
should be concidered and defined in the devfile.Describe the solution you'd like
From eclipse-che/che#15347 (adapted to devfile 2)
Each projects defined in a workspace, would possibly have a list of folder that would be workspace roots of the Che workspace.
/projects
is the default one.would add the 3 folders
/projects/nodejs-ex
,/projects/che-quarkus-demo/quarkus-backend
,/projects/che-quarkus-demo/node-frontend
as workspace root.Of course if the user is using the command
Add folder to workspace
, the devfile of the workspace would need to be updated./projects/nodejs-ex-sunix
is not added as a workspace root because of it hasroots
array empty./projects/nodejs-ex
is added as a workspace root because it is the default behaviour if noroots
element is defined.would be similar to
Describe alternatives you've considered
Using sparseCheckoutDirs, but user may want to keep the whole. sparseCheckoutDirs is useful for examples/samples repositories.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: