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

Fix tree editor dependency for Theia 1.18+ #118

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ module.exports = class TheiaExtension extends Base {
this.params.dependencies = '';
this.params.browserDevDependencies = '';
if (this.params.extensionType === ExtensionType.TreeEditor) {
this.params.dependencies = `,\n "@theia/editor": "${this.params.theiaVersion}",\n "@theia/filesystem": "${this.params.theiaVersion}",\n "@theia/workspace": "${this.params.theiaVersion}",\n "@eclipse-emfcloud/theia-tree-editor": "latest",\n "uuid": "^3.3.2"`;
this.params.dependencies = `,\n "@theia/editor": "${this.params.theiaVersion}",\n "@theia/filesystem": "${this.params.theiaVersion}",\n "@theia/workspace": "${this.params.theiaVersion}",\n "@eclipse-emfcloud/theia-tree-editor": "next",\n "uuid": "^3.3.2"`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe using a mismatch of latest and next will cause issues (especially for inversify) as it can potentially pull different versions of the same extension (ex: @theia/core).

In addition, if a user passes --theia-version on the command line while generating the extension it will not work well either:

$ yo theia-extension --theia-version=1.17.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick feedback @vince-fugnitto :)

I agree that this is not an optimal solution but more of a temporary solution until there are regular numbered releases (or RCs) of the tree editor. As of now there aren't any and the latest tag is currently not updated because there was no release CQ done, yet.

In the current state, the tree extension does not work at all with Theia 1.18.0 (or any Theia version since the switch to ECMA2017).
For the moment, I see two possible solutions: Set it to next or set it to a specific version (0.7.0-next.0324b32).

In addition, if a user passes --theia-version on the command line while generating the extension it will not work well either:

I think this will be a general problem even if using latest because the user can always put in a Theia version that is too old. To fix this, we'd need to pass in or derive a separate version for the tree. I think this is a separate issue to the current one.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think this reveals a general issue: #119

this.params.browserDevDependencies = `,\n "node-polyfill-webpack-plugin": "latest"`;
}
if (this.params.extensionType === ExtensionType.Widget) {
Expand Down