-
Notifications
You must be signed in to change notification settings - Fork 38
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
Terminal component installs the global eyre handler based on color choice #589
Comments
As long as Abscissa framework's Terminal component performs eyre initialization under the hood and panics if it's already initialized, the application should not do it. Unfortunately, Abscissa's initialization of the error handler is directed only by terminal colorization choice, which should be orthogonal to the user's preference for backtraces in the reports. Filed iqlusioninc/abscissa#589 to bring this problem up to Abscissa's developers.
Agreed this is a problem. In general the quality of the It would be nice to expose something more configurable. cc @yaahc |
As long as Abscissa framework's Terminal component performs eyre initialization under the hood and panics if it's already initialized, the application should not do it. Unfortunately, Abscissa's initialization of the error handler is directed only by terminal colorization choice, which should be orthogonal to the user's preference for backtraces in the reports. Filed iqlusioninc/abscissa#589 to bring this problem up to Abscissa's developers.
I'd probably go about this by making sure users of abscissa have a chance to |
The Terminal component of the framework performs initialization of the global eyre handler with
color_eyre::install
, unless the application's color choice is set toNever
. If the handler installation fails, a panic occurs.This is problematic, because the application should be in control of setting such things as program-global error/panic handlers.
Or, if it's really decided that the framework is so opinionated that it makes eyre setup part of its functionality, it should provide an API to override it. The colorization choice alone is a poor way to control this, because the application may want to set up error reporting differently based on other settings (e.g. whether backtraces are enabled).
The text was updated successfully, but these errors were encountered: