Skip to content

Commit 2a3901c

Browse files
committed
Isolate old rustc version tests from needing anyhow dev-dependencies in lockfile
Otherwise: error: failed to select a version for the requirement `syn = "^2.0.87"` candidate versions found which didn't match: 2.0.56, 2.0.55, 2.0.54, ... location searched: crates.io index required by package `thiserror-impl v2.0.0` ... which satisfies dependency `thiserror-impl = "=2.0.0"` of package `thiserror v2.0.0` ... which satisfies dependency `thiserror = "^2"` of package `anyhow v1.0.92`
1 parent 3ca2cdd commit 2a3901c

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ jobs:
6363
with:
6464
toolchain: ${{matrix.rust}}
6565
components: rust-src
66-
- run: cargo check
67-
- run: cargo check --no-default-features
68-
- run: cargo check --features backtrace
66+
- run: cargo check --manifest-path tests/crate/Cargo.toml
67+
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features
68+
- run: cargo check --manifest-path tests/crate/Cargo.toml --features backtrace
6969
if: matrix.rust != '1.65.0' && matrix.rust != '1.52.0' && matrix.rust != '1.51.0' && matrix.rust != '1.50.0' && matrix.rust != '1.39.0'
7070

7171
minimal:

tests/crate/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "anyhow_test"
3+
version = "0.0.0"
4+
authors = ["David Tolnay <dtolnay@gmail.com>"]
5+
edition = "2018"
6+
publish = false
7+
8+
[lib]
9+
path = "test.rs"
10+
11+
[dependencies]
12+
anyhow = { path = "../..", default-features = false }
13+
14+
[features]
15+
default = ["std"]
16+
std = ["anyhow/std"]
17+
backtrace = ["anyhow/backtrace"]

tests/crate/test.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![no_std]
2+
3+
pub use anyhow::*;

0 commit comments

Comments
 (0)