Skip to content

Commit

Permalink
chore: update MSRVs from 1.42 to 1.49 (tokio-rs#1913)
Browse files Browse the repository at this point in the history
This updates all crates' MSRVs to 1.49 if they were not already greater
than that (`tracing-appender` is at 1.53). Rust 1.49+ is required to
update `parking_lot` to v0.12 (see tokio-rs#1878). Also, `futures-task` (which I
believe is only needed as a transitive dep) now needs 1.45+, so this
also fixes our CI build.

Because `tracing-opentelemetry` previously required 1.46.0, it had a
separate CI MSRV job. Since 1.49.0 is greater than 1.46.0, the separate
check for `tracing-opentelemetry` is no longer needed.

In the process, I removed deprecated uses of
`core::atomic::spin_loop_hint`, which is replaced with
`core::hint::spin_loop` in 1.49.
  • Loading branch information
hawkw authored and kaffarell committed May 22, 2024
1 parent 881b247 commit 34448d7
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/check_msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Check MSRV

on:
push:
branches:
- master
- "v0.1.x"
pull_request: {}

env:
# Disable incremental compilation.
#
# Incremental compilation is useful as part of an edit-build-test-edit cycle,
# as it lets the compiler avoid recompiling code that hasn't changed. However,
# on CI, we're not making small edits; we're almost always building the entire
# project from scratch. Thus, incremental compilation on CI actually
# introduces *additional* overhead to support making future builds
# faster...but no future builds will ever occur in any given CI environment.
#
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
# for details.
CARGO_INCREMENTAL: 0
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short

jobs:
check-msrv:
# Run `cargo check` on our minimum supported Rust version (1.49.0).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.49.0
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --exclude=tracing-appender

# TODO: remove this once tracing's MSRV is bumped.
check-msrv-appender:
# Run `cargo check` on our minimum supported Rust version (1.53.0).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.53.0
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --lib=tracing-appender
2 changes: 1 addition & 1 deletion tracing-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The crate provides the following types:
[`tracing`]: https://crates.io/crates/tracing
[OpenTelemetry]: https://opentelemetry.io/

*Compiler support: [requires `rustc` 1.42+][msrv]*
*Compiler support: [requires `rustc` 1.49+][msrv]*

[msrv]: #supported-rust-versions

Expand Down
4 changes: 2 additions & 2 deletions tracing-opentelemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! [OpenTelemetry]: https://opentelemetry.io
//! [`tracing`]: https://github.com/tokio-rs/tracing
//!
//! *Compiler support: [requires `rustc` 1.42+][msrv]*
//! *Compiler support: [requires `rustc` 1.49+][msrv]*
//!
//! [msrv]: #supported-rust-versions
//!
Expand Down Expand Up @@ -79,7 +79,7 @@
//! ## Supported Rust Versions
//!
//! Tracing is built against the latest stable release. The minimum supported
//! version is 1.42. The current Tracing version is not guaranteed to build on
//! version is 1.49. The current Tracing version is not guaranteed to build on
//! Rust versions earlier than the minimum supported version.
//!
//! Tracing follows the same compiler support policies as the rest of the Tokio
Expand Down

0 comments on commit 34448d7

Please sign in to comment.