Comments (6)
Is it only color-eyre that is doing this? I'm curious to see if you use other cli tools that colorize their output, do their color codes show up verbatim or does it still work? And if so are they outputting ANSI escape codes or are they using windows APIs?
I don't have access to Windows Terminal Preview atm so it might take me a while to get around to reproducing this myself.
from color-eyre.
Crates depending on termcolor
:
- cargo
- ripgrep
Crates depending on colored
:
- color-eyre
- cargo-make
- cargo-geiger (does not compile)
Crates depending on owo-colors
:
- hex-rgb
Looks like it's only color-eyre
. I made sure that I've called color_eyre::install()
:)
Windows Terminal: https://github.com/microsoft/terminal/releases/tag/v1.7.572.0
from color-eyre.
wow, other crates depending on owo-colors
worked??? What version of owo-colors
are they depending on?
from color-eyre.
color-eyre: ^1.2.1
hex-rgb: ^1.1.3
If not installed with the --locked
flag they both would resolve to the newest minor which would be 1.3.0, which makes this even weirder... 1.3.0 added support for tty
checking. It's gated behind a feature flag though.
Edit: I did more testing. I have a crate that hard-encodes ANSI colored strings into it:
pub const INFO_SYMBOL: Emoji = Emoji::new("\u{1b}[34mℹ\u{1b}[0m", "\u{1b}[34mi\u{1b}[0m");
And these fail as well:
$ gh labels -r https://github.com/SirWindfield/terminal-spinners-rs update --purge
←[34mℹ←[0m Purging all 24 labels...
←[34mℹ←[0m Repository has 0 labels, creating 24 and updating 0...
I am so clueless... I have no clue why one CLI (hex-rgb
) works but the other library (color-eyre
) does not... For the sake of completeness I also tested on the newest stable release of WT (Version: 1.6.10571.0), same behavior.
from color-eyre.
I'm running into this issue as well, except cross-compiled on Linux, running through Wine:
cargo run --target x86_64-pc-windows-gnu --example=usage
# or if you don't use a binfmt
cargo build --target x86_64-pc-windows-gnu --example=usage
wine ./target/x86_64-pc-windows-gnu/debug/examples/usage.exe
Interestingly, the tracing event log is perfectly colored, and bold and italics always work. Only color codes in the error message and span trace are messed up.
Version: 4a7b4d6
from color-eyre.
Any temporary fix to this, such as conditionally disabling color on windows? Ive looked but not found a way to disable color for windows, unless i pull in regular eyre just for said windows build.
from color-eyre.
Related Issues (20)
- How to access fields of a Report
- Attach Report's to an error via Section::error()
- Report creation takes a lock HOT 3
- Print a backtrace/spantrace to debug logs not to stderr HOT 1
- panic in tests (I used master) HOT 1
- Is there an easy way to make custom errors have equivalent report functions HOT 1
- show sections when panic macro is called HOT 1
- Output has few/no colors in Gnome Terminal
- should info! events be captured and printed as part of the SpanTrace? HOT 1
- Mechanism to add sections in hook callback
- Omit numbering of errors if there's only one HOT 2
- color-eyre uses the same inexplicable information order as standard backtraces HOT 1
- Automate synchronization between docs.rs and README.md
- Disable setting panic hook HOT 2
- Ergonomics: Full re-exports from `eyre`; export `color_eyre::eyre!` macro, rather than `eyre` crate HOT 2
- Add a config option to print panic output to stdout.
- First eyre::Result::Err variant is slow to construct if backtraces are enabled
- Construct a new `Handler` after already having created one / modify handler HOT 1
- Wrap types so we don't have to re-export `owo_colors` HOT 2
- New version of backtrace doesn't export `gimli-symbolize` anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from color-eyre.