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

plugin host not to crash on activation error and add messages #6097

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

amiramw
Copy link
Member

@amiramw amiramw commented Sep 3, 2019

to notify the end user about plugin activation or loading errors

Signed-off-by: Amiram Wingarten amiram.wingarten@sap.com

What it does

Fixes a behavior such that exception on activatation method carshes plugin host without showing the exception anywhere which make it impossible to investigate without debugging the plugins.
Now such exception is catched, logged and message is showed to the end user.
Cover some of the issues raised in #6061

How to test

Create extension with activation event * and throw an exception on the activation method. Make sure that when loading it a proper message is printed to console and showed to the end user. Make sure that plugin host doesn't crash and that other plugins still work.

Review checklist

Reminder for reviewers

@amiramw amiramw requested a review from a team as a code owner September 3, 2019 21:18
@akosyakov
Copy link
Member

Create extension with activation event * and throw an exception on the activation method. Make sure that when loading it a proper message is printed to console and showed to the end user. Make sure that plugin host doesn't crash and that other plugins still work.

@amiramw Could you provide an extension please?

@akosyakov akosyakov added the plug-in system issues related to the plug-in system label Sep 4, 2019
@akosyakov akosyakov requested a review from a team September 4, 2019 03:00
@amiramw
Copy link
Member Author

amiramw commented Sep 5, 2019

@akosyakov here is an example for such problematic extension: https://github.com/amiramw/error-activate-vscode

@amiramw amiramw force-pushed the activation branch 2 times, most recently from e932613 to 0ffc002 Compare September 5, 2019 12:27
@amiramw
Copy link
Member Author

amiramw commented Sep 5, 2019

@akosyakov i believe i addressed all the comments. please review.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I've tested that dart and flutter (dependent) still can be installed together and that failing activation of extension does not break loading of other extensions. @amiramw thank you for the work!

Screen Shot 2019-09-06 at 07 58 44

@akosyakov
Copy link
Member

akosyakov commented Sep 6, 2019

I think it completely fixes #6061

to notify the end user about plugin activation or loading errors

Signed-off-by: Amiram Wingarten <amiram.wingarten@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants