Skip to content

Rework che-theia build process to not use source linking #16852

@tsmaeder

Description

@tsmaeder

Currently, we're linking source folders in order build che theia, we have the following structure ('->' being a symlink):

/theia
  /.git
  ...
  /plugins
    ->/theia/che/che-theia/plugins/task-plugin
    ...
  /extensions
    ->/theia/che/che-theia/extensions/eclipse-che-theia-about
  /che
    /che-theia
    /.git
    ...
    /plugins
      /task-plugin
    /extensions
      /eclipse-che-theia-about

The problem with this is that the build process does not handle source links very well: for one things, there will be two node_modules folder: one inside /theia and one inside /theia/che/che-theia. The fact that cd /projects/theia && yarn becomes broken when you rebuild a che plugin or extension seems to be a consequence of this (deleting both node_modules directories fixes the problem).
Since the build only works if the che-theia folder is located inside the theia folder, there is an additional drawback: the theia git tools cannot be used for changes in che-theia, because theia can't handle the case of nested git repos, it seems.

My proposal is to move to a setup that is based on yarn link. The idea is to have che-theia as a separate repository and to yarn link $package the theia packages in the appropriate places. The setup would look like this:

/theia
...just a vanilla theia install with all the packages linked to ~/.config/yarn/link
/che-theia
/assembly
...
/extensions
...
/plugins
...

I was able to almost make this work in a day an it seemed to address the problems mentioned above. I think investing some more time would be worth the time.

Metadata

Metadata

Assignees

Labels

area/pluginskind/enhancementA feature request - must adhere to the feature request template.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.severity/P2Has a minor but important impact to the usage or development of the system.sprint/current

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions