-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
#7295 Theia API is incompatible with VSCode #7296
Conversation
@vince-fugnitto would you do another review pass? |
@JonasHelming, please check the commit message - I think there was a mishap with it at some point. |
@JonasHelming in addition to Marc's comment, do you perhaps have an already created plugin for which to test the changes without reviewers having to each create the plugin themselves? |
…theia#7295 fixed theia.commands.registerCommand to be compatible with VSCode Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
Obviously I do, here you go :-) |
fixed |
I'm getting the following build error when attempting to build the plugin (ex: result of
|
Hmm, that is weird. I can have a look again, but just to be sure: Did you link the fixed version of this package? If you look at packages/plugin/src/theia.d.ts, the commands.registerCommand function should accept both, a String or a CommandDescription |
@JonasHelming I haven't linked, did you mean run the command |
Yes, you have to make sure that the build of the test plugin uses the adapted package containing the fix. Otherwise it is expected that the build fails (that is kind of the reported issue) |
Okay no problem! I'll update the pull-request 'how to test' to be a bit clearer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that I am able to run all three hello-world
commands from the plugin 👍
I'll give others a chance to try out the pull-request as well.
@benoitf and @azatsarynnyy Do you mind to have a look? If you do not want this change, please feel free to let me know. |
@vince-fugnitto I think enough time has elapsed for all interested to have a look and comment? Time to merge? |
fixed theia.commands.registerCommand to be compatible with VSCode
Signed-off-by: Jonas Helming jhelming@eclipsesource.com
What it does
Fixes issue #7295
Changes the theia plugin API to accept CommandDescription OR string at commands.registerCommand.
Moves special handling of this function from initializer to plugin context.
How to test
Link the adapted packages locally.
instanciate a theia hello world plugin (yo @theia/plugin)
Use the following example code in the plugin implementation:
Register the two commands without a label in the package.json like so:
Test that all three hello world commands work when launching the plugin.
Review checklist
Reminder for reviewers