Skip to content

Commit

Permalink
Isolate old rustc version tests from needing anyhow dev-dependencies …
Browse files Browse the repository at this point in the history
…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`
  • Loading branch information
dtolnay committed Nov 6, 2024
1 parent 3ca2cdd commit 2a3901c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
with:
toolchain: ${{matrix.rust}}
components: rust-src
- run: cargo check
- run: cargo check --no-default-features
- run: cargo check --features backtrace
- run: cargo check --manifest-path tests/crate/Cargo.toml
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features
- run: cargo check --manifest-path tests/crate/Cargo.toml --features backtrace
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'

minimal:
Expand Down
17 changes: 17 additions & 0 deletions tests/crate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "anyhow_test"
version = "0.0.0"
authors = ["David Tolnay <dtolnay@gmail.com>"]
edition = "2018"
publish = false

[lib]
path = "test.rs"

[dependencies]
anyhow = { path = "../..", default-features = false }

[features]
default = ["std"]
std = ["anyhow/std"]
backtrace = ["anyhow/backtrace"]
3 changes: 3 additions & 0 deletions tests/crate/test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#![no_std]

pub use anyhow::*;

0 comments on commit 2a3901c

Please sign in to comment.