Skip to content

Commit 9e309b7

Browse files
committed
Support unstable-less nightly
This change attempts to put unstable features behind an opt-in feature flag as requested by issue #120. Unstable lints and compile_test.rs are both gated by this feature which is added unconditionally to all CI that touches more than just stable. As expressed in issue #120, I have some concerns about *needing* to gate compile_test.rs behind feature = "unstable". I'm not certain that this unstable-less nightly eyre will work in production due to the reason that compile_test.rs fails: three of our dependencies, anyhow, thiserror, and proc-macro, all use a test for a nightly toolchain to gate unstable features. Maybe I'm wrong though and this change is sufficient!
1 parent 75511af commit 9e309b7

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- uses: actions-rs/cargo@v1
5858
with:
5959
command: test
60-
args: --all ${{ matrix.features }}
60+
args: --all --unstable ${{ matrix.features }}
6161

6262
test-msrv:
6363
name: Test Suite
@@ -79,7 +79,7 @@ jobs:
7979
- uses: actions-rs/cargo@v1
8080
with:
8181
command: test
82-
args: --all ${{ matrix.features }}
82+
args: --all --unstable ${{ matrix.features }}
8383

8484
test-os:
8585
name: Test Suite

color-spantrace/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ repository = { workspace = true }
1111
readme = { workspace = true }
1212
rust-version = { workspace = true }
1313

14+
[features]
15+
default = ["auto-install", "track-caller"]
16+
auto-install = []
17+
track-caller = []
18+
unstable = []
19+
1420
[dependencies]
1521
tracing-error = "0.2.0"
1622
tracing-core = "0.1.21"

color-spantrace/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
6262
#![doc(html_root_url = "https://docs.rs/color-spantrace/0.2.0")]
6363
#![cfg_attr(
64-
nightly,
64+
all(nightly, feature = "unstable"),
6565
feature(rustdoc_missing_doc_code_examples),
6666
warn(rustdoc::missing_doc_code_examples)
6767
)]

eyre/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rust-version = { workspace = true }
1616
default = ["auto-install", "track-caller"]
1717
auto-install = []
1818
track-caller = []
19+
unstable = []
1920

2021
[dependencies]
2122
indenter = { workspace = true }

eyre/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
317317
#![doc(html_root_url = "https://docs.rs/eyre/0.6.8")]
318318
#![cfg_attr(
319-
nightly,
319+
all(nightly, feature = "unstable"),
320320
feature(rustdoc_missing_doc_code_examples),
321321
warn(rustdoc::missing_doc_code_examples)
322322
)]

eyre/tests/compiletest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[rustversion::attr(not(nightly), ignore)]
1+
#[cfg_attr(any(not(nightly), not(feature = "unstable")), ignore)]
22
#[cfg_attr(miri, ignore)]
33
#[test]
44
fn ui() {

0 commit comments

Comments
 (0)