Skip to content

Commit

Permalink
bump MSRV to 1.64 and indexmap to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shaun-cox committed Aug 11, 2023
1 parent 1d4db15 commit b9c4184
Show file tree
Hide file tree
Showing 36 changed files with 52 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.60.0
toolchain: 1.64.0
override: true
- name: Patch dependencies versions # some dependencies bump MSRV without major version bump
run: ./scripts/patch_dependencies.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ analysis in order to understand your software's performance and behavior. You
can export and analyze them using [Prometheus], [Jaeger], and other
observability tools.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[Prometheus]: https://prometheus.io
[Jaeger]: https://www.jaegertracing.io
Expand Down Expand Up @@ -168,7 +168,7 @@ above, please let us know! We'd love to add your project to the list!
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.60. The current OpenTelemetry version is not guaranteed to build
version is 1.64. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust"
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
indexmap = "1.8"
indexmap = "2.0"
once_cell = "1.12.0"
pin-project-lite = { version = "0.2", optional = true }
thiserror = "1"
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ analysis in order to understand your software's performance and behavior. You
can export and analyze them using [Prometheus], [Jaeger], and other
observability tools.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[Prometheus]: https://prometheus.io
[Jaeger]: https://www.jaegertracing.io
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! services to capture distributed traces and metrics from your application. You
//! can analyze them using [Prometheus], [Jaeger], and other observability tools.
//!
//! *Compiler support: [requires `rustc` 1.60+][msrv]*
//! *Compiler support: [requires `rustc` 1.64+][msrv]*
//!
//! [Prometheus]: https://prometheus.io
//! [Jaeger]: https://www.jaegertracing.io
Expand All @@ -11,7 +11,7 @@
//! ## Supported Rust Versions
//!
//! OpenTelemetry is built against the latest stable release. The minimum
//! supported version is 1.60. The current OpenTelemetry version is not
//! supported version is 1.64. The current OpenTelemetry version is not
//! guaranteed to build on Rust versions earlier than the minimum supported
//! version.
//!
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/src/order_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ impl<K, V, S> OrderMap<K, V, S> {
/// Valid indices are *0 <= index < self.len()*
///
/// Computes in **O(1)** time.
pub fn get_index_mut(&mut self, index: usize) -> Option<(&mut K, &mut V)> {
pub fn get_index_mut(&mut self, index: usize) -> Option<(&K, &mut V)> {

Check warning on line 380 in opentelemetry-api/src/order_map.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-api/src/order_map.rs#L380

Added line #L380 was not covered by tests
self.0.get_index_mut(index)
}

Expand Down
9 changes: 2 additions & 7 deletions opentelemetry-api/src/trace/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ pub enum SpanKind {
///
/// Only the value of the last call will be recorded, and implementations are
/// free to ignore previous calls.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd)]
#[derive(Default, Debug, Clone, PartialEq, Eq, PartialOrd)]
pub enum Status {
/// The default status.
#[default]
Unset,

/// The operation contains an error.
Expand Down Expand Up @@ -298,12 +299,6 @@ impl Status {
}
}

impl Default for Status {
fn default() -> Self {
Status::Unset
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-appender-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/ope
readme = "README.md"
keywords = ["opentelemetry", "log", "logs"]
license = "Apache-2.0"
rust-version = "1.60"
rust-version = "1.64"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-appender-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/ope
readme = "README.md"
keywords = ["opentelemetry", "log", "logs", "tracing"]
license = "Apache-2.0"
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
opentelemetry_api = { version = "0.20", path = "../opentelemetry-api", features = ["logs"] }
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-aws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = [
keywords = ["opentelemetry", "tracing"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-contrib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = [
keywords = ["opentelemetry", "tracing"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-datadog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = [
keywords = ["opentelemetry", "tracing"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -24,7 +24,7 @@ reqwest-client = ["reqwest", "opentelemetry-http/reqwest"]
surf-client = ["surf", "opentelemetry-http/surf"]

[dependencies]
indexmap = "1.8"
indexmap = "2.0"
once_cell = "1.12"
opentelemetry = { version = "0.20", path = "../opentelemetry", features = ["trace"] }
opentelemetry-http = { version = "0.9", path = "../opentelemetry-http" }
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-dynatrace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "metrics", "dynatrace"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust"
keywords = ["opentelemetry", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
async-trait = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ analysis in order to understand your software's performance and behavior. This
crate provides a HTTP client interface for use by trace exporters, as well as
helper types to inject and extract key value pairs into/from HTTP headers.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[`OpenTelemetry`]: https://crates.io/crates/opentelemetry
[msrv]: #supported-rust-versions

## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.60. The current OpenTelemetry version is not guaranteed to build
version is 1.64. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "jaeger", "tracing", "async"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ analysis in order to understand your software's performance and behavior. This
crate provides a trace pipeline and exporter for sending span information to a
Jaeger `agent` or `collector` endpoint for processing and visualization.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[`Jaeger`]: https://www.jaegertracing.io/
[`OpenTelemetry`]: https://crates.io/crates/opentelemetry
Expand Down Expand Up @@ -146,7 +146,7 @@ fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.60. The current OpenTelemetry version is not guaranteed to build
version is 1.64. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-jaeger/src/exporter/config/collector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ enum ClientConfig {
Wasm, // no config is available for wasm for now. But we can add in the future
}

#[allow(clippy::derivable_impls)]
impl Default for ClientConfig {
fn default() -> Self {
// as long as collector is enabled, we will in favor of it
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry-jaeger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! supports accepting data in the OTLP protocol.
//! See the [Jaeger Docs] for details about Jaeger and deployment information.
//!
//! *Compiler support: [requires `rustc` 1.60+][msrv]*
//! *Compiler support: [requires `rustc` 1.64+][msrv]*
//!
//! [Jaeger Docs]: https://www.jaegertracing.io/docs/
//! [jaeger-deprecation]: https://github.com/open-telemetry/opentelemetry-specification/pull/2858/files
Expand Down Expand Up @@ -285,13 +285,13 @@
//! # Supported Rust Versions
//!
//! OpenTelemetry is built against the latest stable release. The minimum
//! supported version is 1.60. The current OpenTelemetry version is not
//! supported version is 1.64. The current OpenTelemetry version is not
//! guaranteed to build on Rust versions earlier than the minimum supported
//! version.
//!
//! The current stable Rust compiler and the three most recent minor versions
//! before it will always be supported. For example, if the current stable
//! compiler version is 1.60, the minimum supported version will not be
//! compiler version is 1.64, the minimum supported version will not be
//! increased past 1.46, three minor versions prior. Increasing the minimum
//! supported compiler version is not considered a semver breaking change as
//! long as doing so complies with this policy.
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "otlp", "logging", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"
autotests = false

[[test]]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-prometheus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "prometheus", "metrics", "async"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "otlp", "logging", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"
autotests = false

[lib]
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust"
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
opentelemetry_api = { version = "0.20", path = "../opentelemetry-api/" }
Expand Down Expand Up @@ -36,7 +36,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dev-dependencies]
indexmap = "1.8"
indexmap = "2.0"
criterion = { version = "0.5", features = ["html_reports"] }
pprof = { version = "0.12", features = ["flamegraph", "criterion"] }

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ analysis in order to understand your software's performance and behavior. You
can export and analyze them using [Prometheus], [Jaeger], and other
observability tools.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[Prometheus]: https://prometheus.io
[Jaeger]: https://www.jaegertracing.io
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-semantic-conventions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "tracing", "async"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-stackdriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/open-telemetry/opentelemetry-rust"
license = "Apache-2.0"
edition = "2021"
exclude = ["/proto"]
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
async-trait = "0.1.48"
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-stdout/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[features]
trace = ["opentelemetry_api/trace", "opentelemetry_sdk/trace", "futures-util"]
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-stdout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ analysis in order to understand your software's performance and behavior. This
crate provides exporters that export to stdout or any implementation of
[`std::io::Write`].

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
[`OpenTelemetry`]: https://crates.io/crates/opentelemetry
Expand Down Expand Up @@ -70,7 +70,7 @@ Recorded traces and metrics will now be sent to stdout:
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.60. The current OpenTelemetry version is not guaranteed to build
version is 1.64. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-user-events-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
keywords = ["opentelemetry", "metrics", "user-events"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[dependencies]
opentelemetry_api = { version = "0.20", path = "../opentelemetry-api", features = ["metrics"] }
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-zipkin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "zipkin", "tracing", "async"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.64"

[package.metadata.docs.rs]
all-features = true
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry-zipkin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ analysis in order to understand your software's performance and behavior. This
crate provides a trace pipeline and exporter for sending span information to a
Zipkin collector for processing and visualization.

*Compiler support: [requires `rustc` 1.60+][msrv]*
*Compiler support: [requires `rustc` 1.64+][msrv]*

[`Zipkin`]: https://zipkin.io/
[`OpenTelemetry`]: https://crates.io/crates/opentelemetry
Expand Down Expand Up @@ -105,12 +105,12 @@ available so be sure to match them appropriately.
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.60. The current OpenTelemetry version is not guaranteed to build on
version is 1.64. The current OpenTelemetry version is not guaranteed to build on
Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions before
it will always be supported. For example, if the current stable compiler version
is 1.60, the minimum supported version will not be increased past 1.46, three
is 1.64, the minimum supported version will not be increased past 1.46, three
minor versions prior. Increasing the minimum supported compiler version is not
considered a semver breaking change as long as doing so complies with this
policy.

0 comments on commit b9c4184

Please sign in to comment.