Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport #1912 #1914

Merged
merged 3 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,56 +28,6 @@ env:
RUST_BACKTRACE: short

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

# 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

# TODO: remove this once tracing's MSRV is bumped.
check-msrv-opentelemetry:
# Run `cargo check` on our minimum supported Rust version (1.46.0).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.46.0
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --package=tracing-opentelemetry

check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
Expand Down
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ attachment that `Future::instrument` does.
## 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 Rust
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
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tracing-examples"
version = "0.0.0"
publish = false
edition = "2018"
rust-version = "1.42.0"
rust-version = "1.49.0"

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion tracing-appender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rust-version = "1.53.0"
[dependencies]
crossbeam-channel = "0.5.0"
time = { version = "0.3", default-features = false, features = ["formatting"] }
parking_lot = { optional = true, version = "0.11.2" }
parking_lot = { optional = true, version = "0.12.0" }

[dependencies.tracing-subscriber]
path = "../tracing-subscriber"
Expand Down
2 changes: 1 addition & 1 deletion tracing-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ keywords = ["logging", "tracing", "macro", "instrument", "log"]
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.42.0"
rust-version = "1.49.0"

[lib]
proc-macro = true
Expand Down
4 changes: 2 additions & 2 deletions tracing-attributes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ structured, event-based diagnostic information. This crate provides the

Note that this macro is also re-exported by the main `tracing` crate.

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

[msrv]: #supported-rust-versions

Expand Down Expand Up @@ -69,7 +69,7 @@ pub fn my_function(my_arg: usize) {
## 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 Rust
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
4 changes: 2 additions & 2 deletions tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! Note that this macro is also re-exported by the main `tracing` crate.
//!
//! *Compiler support: [requires `rustc` 1.42+][msrv]*
//! *Compiler support: [requires `rustc` 1.49+][msrv]*
//!
//! [msrv]: #supported-rust-versions
//!
Expand Down Expand Up @@ -41,7 +41,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
2 changes: 1 addition & 1 deletion tracing-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ categories = [
]
keywords = ["logging", "tracing", "profiling"]
edition = "2018"
rust-version = "1.42.0"
rust-version = "1.49.0"

[features]
default = ["std", "valuable/std"]
Expand Down
4 changes: 2 additions & 2 deletions tracing-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The crate provides:
In addition, it defines the global callsite registry and per-thread current
dispatcher which other components of the tracing system rely on.

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

[msrv]: #supported-rust-versions

Expand Down Expand Up @@ -99,7 +99,7 @@ The following crate feature flags are available:
## 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 Rust
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
4 changes: 2 additions & 2 deletions tracing-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! In addition, it defines the global callsite registry and per-thread current
//! dispatcher which other components of the tracing system rely on.
//!
//! *Compiler support: [requires `rustc` 1.42+][msrv]*
//! *Compiler support: [requires `rustc` 1.49+][msrv]*
//!
//! [msrv]: #supported-rust-versions
//!
Expand Down Expand Up @@ -92,7 +92,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
12 changes: 3 additions & 9 deletions tracing-core/src/spin/once.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use core::cell::UnsafeCell;
use core::fmt;
use core::hint::spin_loop;
use core::sync::atomic::{AtomicUsize, Ordering};
// TODO(eliza): replace with `core::hint::spin_loop` once our MSRV supports it.
#[allow(deprecated)]
use core::sync::atomic::spin_loop_hint as cpu_relax;

/// A synchronization primitive which can be used to run a one-time global
/// initialization. Unlike its std equivalent, this is generalized so that the
Expand Down Expand Up @@ -109,10 +107,8 @@ impl<T> Once<T> {
match status {
INCOMPLETE => unreachable!(),
RUNNING => {
// TODO(eliza): replace with `core::hint::spin_loop` once our MSRV supports it.
#[allow(deprecated)]
// We spin
cpu_relax();
spin_loop();
status = self.state.load(Ordering::SeqCst)
}
PANICKED => panic!("Once has panicked"),
Expand All @@ -138,9 +134,7 @@ impl<T> Once<T> {
INCOMPLETE => return None,

RUNNING => {
// TODO(eliza): replace with `core::hint::spin_loop` once our MSRV supports it.
#[allow(deprecated)]
cpu_relax() // We spin
spin_loop() // We spin
}
COMPLETE => return Some(self.force_get()),
PANICKED => panic!("Once has panicked"),
Expand Down
2 changes: 1 addition & 1 deletion tracing-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keywords = [
"backtrace"
]
edition = "2018"
rust-version = "1.42.0"
rust-version = "1.49.0"

[features]
default = ["traced-error"]
Expand Down
4 changes: 2 additions & 2 deletions tracing-error/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The crate provides the following:

**Note**: This crate is currently experimental.

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

[msrv]: #supported-rust-versions

Expand Down Expand Up @@ -186,7 +186,7 @@ fn main() {
## 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 Rust
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
4 changes: 2 additions & 2 deletions tracing-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//!
//! **Note**: This crate is currently experimental.
//!
//! *Compiler support: [requires `rustc` 1.42+][msrv]*
//! *Compiler support: [requires `rustc` 1.49+][msrv]*
//!
//! [msrv]: #supported-rust-versions
//!
Expand Down Expand Up @@ -174,7 +174,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
2 changes: 1 addition & 1 deletion tracing-flame/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ categories = [
"asynchronous",
]
keywords = ["tracing", "subscriber", "flamegraph", "profiling"]
rust-version = "1.42.0"
rust-version = "1.49.0"

[features]
default = ["smallvec"]
Expand Down
4 changes: 2 additions & 2 deletions tracing-flame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ flamegraph/flamechart. Flamegraphs/flamecharts are useful for identifying perfor
bottlenecks in an application. For more details, see Brendan Gregg's [post]
on flamegraphs.

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

[msrv]: #supported-rust-versions
[post]: http://www.brendangregg.com/flamegraphs.html
Expand Down Expand Up @@ -106,7 +106,7 @@ _flamechart_, which _does not_ sort or collapse identical stack frames.
## 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 Rust
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
4 changes: 2 additions & 2 deletions tracing-flame/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! issues bottlenecks in an application. For more details, see Brendan Gregg's [post]
//! on flamegraphs.
//!
//! *Compiler support: [requires `rustc` 1.42+][msrv]*
//! *Compiler support: [requires `rustc` 1.49+][msrv]*
//!
//! [msrv]: #supported-rust-versions
//! [post]: http://www.brendangregg.com/flamegraphs.html
Expand Down Expand Up @@ -98,7 +98,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
2 changes: 1 addition & 1 deletion tracing-futures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = [
]
keywords = ["logging", "profiling", "tracing", "futures", "async"]
license = "MIT"
rust-version = "1.42.0"
rust-version = "1.49.0"

[features]
default = ["std-future", "std"]
Expand Down
4 changes: 2 additions & 2 deletions tracing-futures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ The crate provides the following traits:
[`Subscriber`]: https://docs.rs/tracing/latest/tracing/subscriber/index.html
[`tracing`]: https://crates.io/crates/tracing

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

[msrv]: #supported-rust-versions

## 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 Rust
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
Loading