Skip to content

Commit

Permalink
Update ruzstd from 0.7 to 0.8
Browse files Browse the repository at this point in the history
This increases MSRV since ruzstd 0.8 uses `#[expect]` attribute
stabilized in Rust 1.81 and exclusive range patterns stabilized in Rust
1.80.

```
  error[E0658]: the `#[expect]` attribute is an experimental feature
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ruzstd-0.8.0/src/decoding/frame.rs:116:5
      |
  116 |     #[expect(dead_code)]
      |     ^^^^^^^^^^^^^^^^^^^^
      |
      = note: see issue #54503 <rust-lang/rust#54503> for more information

  error[E0658]: exclusive range pattern syntax is experimental
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ruzstd-0.8.0/src/encoding/blocks/compressed.rs:209:9
      |
  209 |         0..6 => (0b00u8, 10),
      |         ^^^^
      |
      = note: see issue #37854 <rust-lang/rust#37854> for more information

  error[E0658]: exclusive range pattern syntax is experimental
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ruzstd-0.8.0/src/encoding/blocks/compressed.rs:210:9
      |
  210 |         6..1024 => (0b01, 10),
      |         ^^^^^^^
      |
      = note: see issue #37854 <rust-lang/rust#37854> for more information

  error[E0658]: exclusive range pattern syntax is experimental
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ruzstd-0.8.0/src/encoding/blocks/compressed.rs:211:9
      |
  211 |         1024..16384 => (0b10, 14),
      |         ^^^^^^^^^^^
      |
      = note: see issue #37854 <rust-lang/rust#37854> for more information

  error[E0658]: exclusive range pattern syntax is experimental
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ruzstd-0.8.0/src/encoding/blocks/compressed.rs:212:9
      |
  212 |         16384..262144 => (0b11, 18),
      |         ^^^^^^^^^^^^^
      |
      = note: see issue #37854 <rust-lang/rust#37854> for more information
```
  • Loading branch information
taiki-e committed Dec 25, 2024
1 parent 1555bf5 commit 255ba51
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ mcdc
microkernel
MSYSTEM
nextest
normpath
notcovered
profdata
profraw
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
uses: taiki-e/github-actions/.github/workflows/msrv.yml@main
with:
event_name: ${{ github.event_name }}
# MSRV is 1.74 on Windows due to normpath.
target: x86_64-unknown-linux-gnu
release-dry-run:
uses: taiki-e/github-actions/.github/workflows/release-dry-run.yml@main
tidy:
Expand All @@ -57,11 +55,7 @@ jobs:
fail-fast: false
matrix:
include:
# TODO: nightly-2023-04-27 (https://github.com/rust-lang/rust/pull/97368)
# and nightly-2023-05-03 (https://github.com/rust-lang/rust/pull/111042)
# fixed bugs in report generation, so the latest report is not the
# same as the old report.
# - rust: '1.60'
- rust: '1.81'
- rust: stable
- rust: beta
- rust: nightly
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com

## [Unreleased]

- Update `ruzstd` to 0.8.

This increases the rustc version required to build cargo-llvm-cov. (rustc 1.73+ -> 1.81+)
The cargo/rustc version required to run cargo-llvm-cov remains unchanged.

## [0.6.15] - 2024-12-21

- Remove dependency on `home` to relax the MSRV on Windows.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cargo-llvm-cov"
version = "0.6.15" #publish:version
edition = "2021"
rust-version = "1.73"
rust-version = "1.81"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/taiki-e/cargo-llvm-cov"
keywords = ["cargo", "coverage", "subcommand", "testing"]
Expand Down Expand Up @@ -34,7 +34,7 @@ lexopt = "0.3"
opener = { version = "0.7", default-features = false }
regex = { version = "1.3", default-features = false, features = ["perf", "std"] }
rustc-demangle = { version = "0.1.23", features = ["std"] }
ruzstd = { version = "0.7", default-features = false, features = ["std"] }
ruzstd = { version = "0.8", default-features = false, features = ["std"] }
serde = "1.0.165"
serde_derive = "1.0.165"
serde_json = "1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ cargo-llvm-cov --json | some-program
cargo +stable install cargo-llvm-cov --locked
```

Currently, installing cargo-llvm-cov requires rustc 1.73+ for non-Windows and rustc 1.74+ for Windows.
Currently, installing cargo-llvm-cov requires rustc 1.81+.

cargo-llvm-cov is usually runnable with Cargo versions older than the Rust version
required for installation (e.g., `cargo +1.60 llvm-cov`). Currently, to run
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ fn object_files(cx: &Context) -> Result<Vec<OsString>> {
}
target_dir.push("target");
let archive_file = cx.args.nextest_archive_file.as_ref().unwrap();
let decoder = ruzstd::StreamingDecoder::new(fs::File::open(archive_file)?)?;
let decoder = ruzstd::decoding::StreamingDecoder::new(fs::File::open(archive_file)?)?;
let mut archive = Archive::new(decoder);
let mut binaries_metadata = vec![];
for entry in archive.entries()? {
Expand Down
14 changes: 0 additions & 14 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ fn run(model: &str, name: &str, args: &[&str], envs: &[(&str, &str)]) {
// TODO:
// - add tests for non-crates.io dependencies

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn real1() {
run("real1", "workspace_root", &[], &[]);
Expand All @@ -53,8 +51,6 @@ fn real1() {
run("real1", "exclude", &["--all", "--exclude", "crate1"], &[]);
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn virtual1() {
run("virtual1", "workspace_root", &[], &[]);
Expand Down Expand Up @@ -82,8 +78,6 @@ fn virtual1() {
run("virtual1", "exclude-from-test2", &["--workspace", "--exclude-from-test", "member2"], &[]);
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn no_test() {
run("no_test", "no_test", &[], &[]);
Expand All @@ -92,8 +86,6 @@ fn no_test() {
}
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn bin_crate() {
run("bin_crate", "bin_crate", &[], &[]);
Expand All @@ -105,16 +97,12 @@ fn bin_crate() {
}
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn instantiations() {
// TODO: fix https://github.com/taiki-e/cargo-llvm-cov/issues/43
run("instantiations", "instantiations", &[], &[]);
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn cargo_config() {
run("cargo_config", "cargo_config", &[], &[]);
Expand Down Expand Up @@ -200,8 +188,6 @@ fn merge_with_failure_mode(output_dir: &Path, failure_mode_all: bool) {
}
}

// nightly-2024-02-17 fixed bug in report generation, so the latest report is not the same as the old report.
#[rustversion::attr(before(1.78), ignore)]
#[test]
fn clean_ws() {
let model = "merge";
Expand Down

0 comments on commit 255ba51

Please sign in to comment.