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

Add 'onStartupFinished' event to the list of supported activation events #9212

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Mar 17, 2021

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What it does

Add 'onStartupFinished' event to the list of supported activation events

This fixes an issue which is mentioned here #8525 (comment)

How to test

  1. Clone any Theia plugin e.g https://github.com/eclipse/che-theia-samples/tree/master/samples/hello-world-backend-plugin
  2. Change the activation event in its package.json from * to onStartupFinished
  3. Start the plugin.
  4. See: root ERROR [hosted-plugin: 93564] Unsupported activation events: onStartupFinished, please open an issue: https://github.com/eclipse-theia/theia/issues/new console error is gone.

Review checklist

Reminder for reviewers

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@tsmaeder
Copy link
Contributor

tsmaeder commented Mar 17, 2021

While this fixes the immediate problem, it would be good to make the possible activation events its own type (string union or enum) in order make the compiler complain when we use something that is not supported. Not in this PR maybe, but as a separate refactoring.

Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

If I understand correctly - the support for the onStartupFinished activation event was added within #8525.
The current PR is only adding the onStartupFinished event to the list of supported events.

Tested using the How to test section - I don't see the error in my console and I'm able to use Hello World command from the sample plugin.

@vinokurig
Copy link
Contributor Author

@RomanNikitenko Right, this PR just registers the previously added onStartupFinished activation event as a known one. Thanks for the review!

@vinokurig vinokurig merged commit 9f13354 into master Mar 17, 2021
@github-actions github-actions bot added this to the 1.12.0 milestone Mar 17, 2021
@RomanNikitenko
Copy link
Contributor

@vinokurig
please remove the branch if it's not used anymore

thanks!

@vinokurig vinokurig deleted the theia-8488 branch March 17, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants