eyre-rs / color-eyre

Custom hooks for colorful human oriented error reports via panics and the eyre crate
Other
960 stars 57 forks source link

Add feature more gates for capture-spantrace #70

Closed knutwalker closed 3 years ago

knutwalker commented 3 years ago

When only the issue-url features is enabled, with the default features being disabled, the crate fails to build

$ cargo build --no-default-features --features issue-url
   Compiling color-eyre v0.5.7-alpha.0 (/Users/paul/dev/color-eyre)
error[E0432]: unresolved import `tracing_error`
 --> src/section/github.rs:5:5
  |
5 | use tracing_error::SpanTrace;
  |     ^^^^^^^^^^^^^ use of undeclared type or module `tracing_error`

error[E0282]: type annotations needed
  --> src/section/github.rs:28:25
   |
28 |             span_trace: None,
   |                         ^^^^ cannot infer type for type parameter `T` declared on the enum `Option`

error: aborting due to 2 previous errors

This commit add feature gates for capture-spantrace to the github issue module, so that the issue-url feature can be used standalone.

yaahc commented 3 years ago

oops, sorry about that :sweat_smile:

I've gone ahead and added new CI jobs to test each individual feature, that should hopefully be enough to prevent this from happening again in the future.

yaahc commented 3 years ago

Also, just released 0.5.8, so you should be good to go, thanks again for the PR ^^

knutwalker commented 3 years ago

Awesome, thanks for the quick release 🎉