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

resolve dependency conflict #36

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions opentelemetry-otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## vNext

## v0.26.1
Released 2024-Oct-2

- Pin tonic to v0.12.3

## v0.26.0
Released 2024-Sep-30

Expand Down
5 changes: 5 additions & 0 deletions opentelemetry-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## vNext

## v0.26.1
Released 2024-Oct-2

- Pin tonic to v0.12.3

## v0.26.0
Released 2024-Sep-30

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ with-serde = ["serde", "hex"]
populate-logs-event-name = []

[dependencies]
tonic = { workspace = true, optional = true, features = ["codegen", "prost"] }
tonic = { version = "0.12.3", optional = true, features = ["codegen", "prost"] }
prost = { workspace = true, optional = true }
opentelemetry = { version = "0.26", default-features = false, path = "../opentelemetry" }
opentelemetry_sdk = { version = "0.26", default-features = false, path = "../opentelemetry-sdk" }
Expand Down
24 changes: 17 additions & 7 deletions scripts/patch_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,27 @@ rust_version=$(rustc --version | cut -d' ' -f2)
target_version="1.71.1"

function patch_version() {
local latest_version=$(cargo search --limit 1 $1 | head -1 | cut -d'"' -f2)
echo "patching $1 from $latest_version to $2"
cargo update -p $1:$latest_version --precise $2
local package=$1
local new_version=$2
local crate_path=$3
local latest_version=$(cargo search --limit 1 $package | head -1 | cut -d'"' -f2)
if [ -n "$crate_path" ]; then
# If crate_path is provided, patch only for the specified crate
echo "-->Patching $package in $crate_path from $latest_version to $new_version"
cargo update -p $package:$latest_version --precise $new_version --manifest-path "$crate_path/Cargo.toml"
else
# If crate_path is not provided, patch for the entire workspace
echo "Patching $package in the entire workspace from $latest_version to $new_version"
cargo update -p $package:$latest_version --precise $new_version
fi
}

patch_version cc 1.0.105
patch_version url 2.5.0
if version_lt "$rust_version" "$target_version"; then
patch_version tonic 0.12.2
patch_version tonic 0.12.3 "opentelemetry-sdk"
patch_version hyper-rustls 0.27.2 # 0.27.3 needs rustc v1.70.0
patch_version tokio-util 0.7.11 # 0.7.12 needs rustc v1.70.0
patch_version tokio-stream 0.1.15 # 0.1.16 needs rustc v1.70.0
patch_version tokio 1.38.0 # 1.39 needs msrv bump to rustc 1.70
patch_version tokio-util 0.7.11 "opentelemetry-sdk" # 0.7.12 needs rustc v1.70.0
patch_version tokio-stream 0.1.16 "opentelemetry-sdk" # 0.1.16 needs rustc v1.70.0
patch_version tokio 1.38.0 "opentelemetry-sdk" # 1.39 needs msrv bump to rustc 1.70
fi
Loading