-
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
Rework che-theia build process to not use source linking #16852
Comments
I think it's something that can be done properly/smoothly only with yarn 2 |
Let's give it a try, shall we? |
And why would it not work with yarn 1.x? |
@benoitf ? |
One issue is yarn link is considering links to be folders, not packages
https://yarnpkg.com/features/protocols#whats-the-difference-between-link-and-portal Also the fact that we can store the dependencies should improve velocity. |
@benoitf I've read the linked issue, but I don't really understand why it would block us: the issues seems to state the yarn does not call install on the library packages (in our case: the theia packages). But we could do that ourselves when necessary.
Could you spell out how the yarn link behavior is breaking those requirements? It is not clear to me from reading the issue. |
IMO, two further changes could be made to make the build even simpler:
|
No immediate concerns w/ this for downstream, assuming that the existing method for getting che-theia code into crw-theia remains compatible after your changes (or else we'd rework the crw build.sh script to accommodate your changes). |
It also should be checked that the proposed changes don't break the release flow.
|
Build done in CI and developer environment (che-theia in che) should be using the same script. |
I believe the concrete steps to implement linkless builds would be the following:
|
Just found another case where our current structure is not working: After building plugins (.foreach_yarn), you'll have to clean out |
The plan of attack in #16852 (comment) has been changed slightly:
|
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
Currently, we're linking source folders in order build che theia, we have the following structure ('->' being a symlink):
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 thatcd /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 toyarn 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.
The text was updated successfully, but these errors were encountered: