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 diagnostics when plugins throw runtime exceptions #1259

Open
TwitchBronBron opened this issue Jul 25, 2024 · 1 comment
Open

Add diagnostics when plugins throw runtime exceptions #1259

TwitchBronBron opened this issue Jul 25, 2024 · 1 comment
Milestone

Comments

@TwitchBronBron
Copy link
Member

TwitchBronBron commented Jul 25, 2024

Whenever a plugin throws a runtime exception, we should add a diagnostic somewhere. Since all diagnostics must be tied to a file, perhaps we tie it to the bsconfig.json?

Currently we only show these in the console as console.error calls.

How do we clear the diagnostics though? Would we need to store them with some type of context? (like the name of the plugin event that crashed, so next time it's okay? Or are they stuck until restart? (That might be fine?).

Should we add an option to disable this functionality, or should it just be on all the time? I vote on all the time.

@TwitchBronBron TwitchBronBron added this to the v1.1.0 milestone Jul 25, 2024
@iBicha
Copy link
Contributor

iBicha commented Jul 25, 2024

Should we add an option to disable this functionality, or should it just be on all the time? I vote on all the time.

I can see two cases where someone might want to keep a plugin that is crashing:

  • A validation plugin (e.g bslint) that is crashing on one specific line of code that it can't handle for some reason, but works fine for the rest of the codebase. I might not want this to be a blocker for my build
  • A plugin that transforms files that transforms all files correctly, crashes on one case. It happens that this one case / one file crash is harmless to the build. In this case, perhaps I do not want to disable the plugin (which will break the build) but I do not want to enable the plugin diagnostics because that will also block the build

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

No branches or pull requests

2 participants