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 ENV variables for disabling colour stacktrace printing #40232

Closed

Conversation

nickrobinson251
Copy link
Contributor

@nickrobinson251 nickrobinson251 commented Mar 27, 2021

Alternative option for closing #40228 (alternative to #40230)

Essentially I'd like to avoid the new light_black colour stacktrace printing which I find I can't really read, without having the run with julia --color=no

Couple comments on the approach:

  • how many env variables might we end up needing here?
  • should these be binary true/false or allow custom colours?
    • i've gone for binary true/false. Again, seems simplest. Also matches the existing JULIA_STACKTRACE_* variables.
      • by default (true) you get the color printing that Base sets
      • by setting false you can disable the color printing, recovering something very similar to the printing for Julia v1.0 - v1.5,
    • If we wanted to allow specifying colours we'd have to figure out how, and i don't have a use-case for that, and it seems more like the role of an external package anyway.

If this kind of solution seems acceptable, then i'd appreciate advice on what exactly should be included (i.e. places where the colour should be disabled by this flag), as i think the printing can be fairly complex (it's easy to miss a place).

Example

Default

Screenshot 2021-03-27 at 12 48 49

With ENV["JULIA_STACKTRACE_COLOR_LINES"] = false

Screenshot 2021-03-27 at 17 13 41

With ENV["JULIA_STACKTRACE_COLOR_MODULES"] = false too

Screenshot 2021-03-27 at 17 14 04

@nickrobinson251 nickrobinson251 changed the title Add ENV variable for disabling colour stacktrace printing Add ENV variables for disabling colour stacktrace printing Mar 27, 2021
@nickrobinson251
Copy link
Contributor Author

Bump :)

Is anyone able to provide feedback on this?

Thanks

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.

Improve visibilty of line location in stacktrace e.g. Ability to override/disable muted colour in stacktraces
1 participant