Skip to content

Commit 8c01c1a

Browse files
build: update nixpkgs, cargo and crates
Signed-off-by: Tiago Castro <[email protected]>
1 parent d627f01 commit 8c01c1a

File tree

24 files changed

+98
-112
lines changed

24 files changed

+98
-112
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: nixpkgs-fmt
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.0.1
7+
rev: v5.0.0
88
hooks:
99
- id: trailing-whitespace
1010
- repo: local

apis/events/Cargo.toml

+15-21
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,21 @@ edition = "2021"
55

66

77
[build-dependencies]
8-
tonic-build = "0.10.2"
8+
tonic-build = "0.12.3"
99

1010
[dependencies]
11-
async-nats = "0.32.1"
12-
bytes = "1.5.0"
13-
serde = "1.0.188"
14-
serde_json = "1.0.107"
15-
tokio = "1.32.0"
16-
tracing = "0.1.37"
17-
uuid = { version = "1.4.1", features = ["v4"] }
18-
async-trait = "0.1.73"
19-
futures = "0.3.28"
20-
snafu = "0.7.5"
21-
tonic = "0.10.2"
22-
prost = "0.12.1"
23-
chrono = "0.4.31"
24-
once_cell = "1.18.0"
11+
async-nats = "0.37.0"
12+
bytes = "1.8.0"
13+
serde = "1.0.214"
14+
serde_json = "1.0.132"
15+
tokio = "1.41.0"
16+
tracing = "0.1.40"
17+
uuid = { version = "1.11.0", features = ["v4"] }
18+
async-trait = "0.1.83"
19+
futures = "0.3.31"
20+
snafu = "0.8.5"
21+
tonic = "0.12.3"
22+
prost = "0.13.3"
23+
chrono = "0.4.38"
24+
once_cell = "1.20.2"
2525
prost-extend = { path = "../../prost-extend" }
26-
27-
[dev-dependencies.serde]
28-
# v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
29-
# Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
30-
# https://github.com/serde-rs/serde/issues/2734
31-
version = ">=1.0.188,<1.0.198"

apis/events/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fn main() {
33
.type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]")
44
.extern_path(".google.protobuf.Timestamp", "::prost_extend::Timestamp")
55
.extern_path(".google.protobuf.Duration", "::prost_extend::Duration")
6-
.compile(&["protobuf/v1/event.proto"], &["protobuf/"])
6+
.compile_protos(&["protobuf/v1/event.proto"], &["protobuf/"])
77
.unwrap_or_else(|e| panic!("event v1 protobuf compilation failed: {e}"));
88
}

apis/io-engine/Cargo.toml

+10-16
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,16 @@ version = "1.0.0"
44
edition = "2021"
55

66
[build-dependencies]
7-
tonic-build = "0.10.2"
8-
prost-build = "0.12.1"
7+
tonic-build = "0.12.3"
8+
prost-build = "0.13.3"
99

1010
[dependencies]
11-
tonic = "0.10.2"
12-
bytes = "1.5.0"
13-
prost = "0.12.1"
14-
prost-derive = "0.12.1"
11+
tonic = "0.12.3"
12+
bytes = "1.8.0"
13+
prost = "0.13.3"
14+
prost-derive = "0.13.3"
1515
prost-extend = { path = "../../prost-extend" }
16-
prost-types = "0.12.1"
17-
serde = { version = "1.0.188", features = ["derive"] }
18-
serde_derive = "1.0.188"
19-
serde_json = "1.0.107"
20-
21-
[dev-dependencies.serde]
22-
# v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
23-
# Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
24-
# https://github.com/serde-rs/serde/issues/2734
25-
version = ">=1.0.188,<1.0.198"
16+
prost-types = "0.13.3"
17+
serde = { version = "1.0.214", features = ["derive"] }
18+
serde_derive = "1.0.214"
19+
serde_json = "1.0.132"

apis/io-engine/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
.build_server(true)
1111
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
1212
.extern_path(".google.protobuf.Timestamp", "::prost_extend::Timestamp")
13-
.compile(&["protobuf/mayastor.proto"], &["protobuf"])
13+
.compile_protos(&["protobuf/mayastor.proto"], &["protobuf"])
1414
.unwrap_or_else(|e| panic!("io-engine protobuf compilation failed: {}", e));
1515

1616
tonic_build::configure()
@@ -19,7 +19,7 @@ fn main() {
1919
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
2020
.extern_path(".google.protobuf.Timestamp", "::prost_extend::Timestamp")
2121
.extern_path(".google.protobuf.Duration", "::prost_extend::Duration")
22-
.compile(
22+
.compile_protos(
2323
&[
2424
"protobuf/v1/bdev.proto",
2525
"protobuf/v1/json.proto",

apis/io-engine/src/v1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod pb {
66
// Include Rust sources generated by protobuf.
77
#![allow(unknown_lints)]
88
#![allow(clippy::derive_partial_eq_without_eq)]
9+
#![allow(clippy::doc_lazy_continuation)]
910
tonic::include_proto!("mayastor.v1");
1011
}
1112

composer/Cargo.toml

+7-13
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
tokio = { version = "1.32.0", features = [ "full" ] }
11-
futures = "0.3.28"
12-
tracing = "0.1.37"
13-
once_cell = "1.18.0"
10+
tokio = { version = "1.41.0", features = [ "full" ] }
11+
futures = "0.3.31"
12+
tracing = "0.1.40"
13+
once_cell = "1.20.2"
1414
ipnetwork = "0.20.0"
15-
bollard = "0.15.0"
16-
strum = "0.25"
17-
strum_macros = "0.25"
18-
19-
[dev-dependencies.serde]
20-
# v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
21-
# Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
22-
# https://github.com/serde-rs/serde/issues/2734
23-
version = ">=1.0.188,<1.0.198"
15+
bollard = "0.17.1"
16+
strum = "0.26"
17+
strum_macros = "0.26"

composer/src/composer.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1782,13 +1782,11 @@ impl ComposeTest {
17821782
tracing::trace!("Stopping {name:?}/{id}");
17831783
self.stop_id(&id)
17841784
.await
1785-
.map_err(|error| {
1785+
.inspect_err(|_| {
17861786
tracing::trace!("Failed to stop {name:?}/{id}");
1787-
error
17881787
})
1789-
.map(|ok| {
1788+
.inspect(|_| {
17901789
tracing::trace!("Stopped {name:?}/{id}");
1791-
ok
17921790
})
17931791
})
17941792
.collect::<Vec<_>>();

devinfo/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ authors = ["Jeffry Molanus <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
nix = { version = "0.27.1", default-features = false, features = [ "feature" ] }
9-
semver = "1.0.20"
10-
snafu = "0.7.5"
11-
url = "2.4.1"
12-
uuid = { version = "1.4.1", features = ["v4"] }
8+
nix = { version = "0.29.0", default-features = false, features = [ "feature" ] }
9+
semver = "1.0.23"
10+
snafu = "0.8.5"
11+
url = "2.5.2"
12+
uuid = { version = "1.11.0", features = ["v4"] }
1313
[build-dependencies]
14-
bindgen = "0.68.1"
14+
bindgen = "0.70.1"
1515

1616
[target.'cfg(target_os="linux")'.dependencies]
17-
udev = "0.8.0"
17+
udev = "0.9.1"

devinfo/src/mountinfo/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ impl FromStr for MountInfo {
100100

101101
impl MountInfo {
102102
/// Attempt to parse a `/proc/mounts`-like line.
103-
104103
fn fetch_from_disk_by_path(path: &str) -> io::Result<PathBuf> {
105104
PartitionID::from_disk_by_path(path)
106105
.map_err(|why| Error::new(ErrorKind::InvalidData, format!("{path}: {why}")))?

event-publisher/Cargo.toml

+4-10
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] }
8-
tokio = { version = "1.32.0"}
9-
tracing = "0.1.37"
10-
serde_json = "1.0.107"
7+
tracing-subscriber = { version = "0.3.18", features = [ "env-filter" ] }
8+
tokio = { version = "1.41.0"}
9+
tracing = "0.1.40"
10+
serde_json = "1.0.132"
1111
events-api = { path = "../apis/events" }
12-
13-
[dev-dependencies.serde]
14-
# v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
15-
# Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
16-
# https://github.com/serde-rs/serde/issues/2734
17-
version = ">=1.0.188,<1.0.198"

nix/sources.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": "",
66
"owner": "NixOS",
77
"repo": "nixpkgs",
8-
"rev": "35f9f5784eb50cabac4db09c8c11035dacf36411",
9-
"sha256": "1gq4ajsmg2f5jdmbdhdavcnlg32bzynvvidvb4648pk4gdcnr49h",
8+
"rev": "b06ca0fab3185980a7501d7db273bb9f864580d4",
9+
"sha256": "08pvwij6855wyxq6giyjwj3mdbrl118zzvbr7xdynmb7w9r9lv0l",
1010
"type": "tarball",
11-
"url": "https://github.com/NixOS/nixpkgs/archive/35f9f5784eb50cabac4db09c8c11035dacf36411.tar.gz",
11+
"url": "https://github.com/NixOS/nixpkgs/archive/b06ca0fab3185980a7501d7db273bb9f864580d4.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"rust-overlay": {
@@ -17,10 +17,10 @@
1717
"homepage": "",
1818
"owner": "oxalica",
1919
"repo": "rust-overlay",
20-
"rev": "d064703dc0657a49a17671c74b1a15ea7433e753",
21-
"sha256": "06g1c1ys8ihd3vsjswqrkl8nv9lypizzgivbvwz1aycm34i3ib4z",
20+
"rev": "7509d76ce2b3d22b40bd25368b45c0a9f7f36c89",
21+
"sha256": "12gh5a0clc11b219xrvh08f35v959wnnmm089ys1cmqfdxx9v77n",
2222
"type": "tarball",
23-
"url": "https://github.com/oxalica/rust-overlay/archive/d064703dc0657a49a17671c74b1a15ea7433e753.tar.gz",
23+
"url": "https://github.com/oxalica/rust-overlay/archive/7509d76ce2b3d22b40bd25368b45c0a9f7f36c89.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
}
2626
}
File renamed without changes.

nvmeadm/Cargo.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ version = "1.0.0"
44
edition = "2021"
55

66
[dependencies]
7-
derive_builder = "0.12.0"
8-
enum-primitive-derive = "0.2.2"
7+
derive_builder = "0.20.2"
8+
enum-primitive-derive = "0.3.0"
99
glob = "0.3.1"
1010
ioctl-gen = "0.1.1"
11-
libc = "0.2.148"
12-
nix = { version = "0.27.1", default-features = false, features = [ "ioctl" ] }
13-
num-traits = "0.2.16"
14-
once_cell = "1.18.0"
15-
snafu = "0.7.5"
16-
uuid = { version = "1.4.1", features = ["v4"] }
17-
url = "2.4.1"
11+
libc = "0.2.161"
12+
nix = { version = "0.29.0", default-features = false, features = [ "ioctl" ] }
13+
num-traits = "0.2.19"
14+
once_cell = "1.20.2"
15+
snafu = "0.8.5"
16+
uuid = { version = "1.11.0", features = ["v4"] }
17+
url = "2.5.2"

nvmeadm/src/nvmf_discovery.rs

-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ impl ConnectArgs {
671671
/// ```rust
672672
/// let num_disconnects = nvmeadm::nvmf_discovery::disconnect("mynqn");
673673
/// ```
674-
675674
pub fn disconnect(nqn: &str) -> Result<usize, NvmeError> {
676675
let subsys: Result<Vec<Subsystem>, NvmeError> = NvmeSubsystems::new()?
677676
.filter_map(Result::ok)

nvmeadm/tests/discovery_test.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,10 @@ fn disconnect_test() {
187187
fn test_against_real_target() {
188188
// Disconnect all pre-existing NVMe connections to make sure new controller
189189
// always gets id = 0.
190-
let _nvme_disconnect = Command::new("nvme")
190+
Command::new("nvme")
191191
.arg("disconnect-all")
192192
.spawn()
193+
.and_then(|mut child| child.wait())
193194
.expect("Failed to cleanup NVMe connections !");
194195

195196
// Start an SPDK-based nvmf target

prost-extend/Cargo.toml

+4-10
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ description = "A thinner prost-wkt fork with just the bits we need"
66

77

88
[build-dependencies]
9-
tonic-build = "0.10.2"
9+
tonic-build = "0.12.3"
1010

1111
[dependencies]
12-
chrono = "0.4.26"
13-
serde = { version = "1.0.183", features = [ "derive" ] }
14-
prost = "0.12.1"
15-
16-
[dev-dependencies.serde]
17-
# v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
18-
# Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
19-
# https://github.com/serde-rs/serde/issues/2734
20-
version = ">=1.0.188,<1.0.198"
12+
chrono = "0.4.38"
13+
serde = { version = "1.0.214", features = [ "derive" ] }
14+
prost = "0.13.3"

prost-extend/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ fn main() {
55
"google.protobuf.Duration",
66
"#[derive(serde::Serialize, serde::Deserialize)] #[serde(default)]",
77
)
8-
.compile(&["protobuf/v1/pb_time.proto"], &["protobuf/"])
8+
.compile_protos(&["protobuf/v1/pb_time.proto"], &["protobuf/"])
99
.unwrap_or_else(|e| panic!("prost-extend v1 protobuf compilation failed: {e}"));
1010
}

prost-extend/src/duration.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const NANOS_MAX: i32 = NANOS_PER_SECOND - 1;
99

1010
impl fmt::Display for Duration {
1111
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12-
let mut d = self.clone();
12+
let mut d = *self;
1313
d.normalize();
1414
if self.seconds < 0 && self.nanos < 0 {
1515
write!(f, "-")?;

prost-extend/src/timestamp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl TryFrom<Timestamp> for DateTime<Utc> {
7979
/// Converts proto timestamp to chrono's DateTime<Utc>.
8080
impl Timestamp {
8181
fn date_time_utc(&self) -> DateTime<Utc> {
82-
DateTime::<Utc>::try_from(self.clone()).expect("invalid or out-of-range datetime")
82+
DateTime::<Utc>::try_from(*self).expect("invalid or out-of-range datetime")
8383
}
8484
}
8585

@@ -114,7 +114,7 @@ impl<'de> Deserialize<'de> for Timestamp {
114114
{
115115
struct TimestampVisitor;
116116

117-
impl<'de> Visitor<'de> for TimestampVisitor {
117+
impl Visitor<'_> for TimestampVisitor {
118118
type Value = Timestamp;
119119

120120
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

scripts/rust/for_each.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
for d in `find -maxdepth 3 -name Cargo.toml -printf '%h\n' | grep -v "^./h2"`; do
6+
pushd $d
7+
$@
8+
popd
9+
done
10+

shell.nix

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ profile ? "nightly", version ? "2024-02-06" }:
1+
{ profile ? "nightly", version ? "2024-10-30" }:
22
let
33
sources = import ./nix/sources.nix;
44
pkgs = import sources.nixpkgs {
@@ -35,7 +35,15 @@ pkgs.mkShell {
3535
NODE_PATH = "${nodePackages."@commitlint/config-conventional"}/lib/node_modules";
3636

3737
shellHook = ''
38-
pre-commit install
39-
pre-commit install --hook commit-msg
38+
if [ -z "$CI" ] && [ "$IN_NIX_SHELL" = "impure" ]; then
39+
pre-commit install
40+
pre-commit install --hook commit-msg
41+
fi
42+
43+
if [ -d ~/.cargo/bin ]; then
44+
# Adding ~/.cargo/bin to the path let's us carry on using rustup but it lowers its
45+
# priority: https://github.com/rust-lang/cargo/pull/11023
46+
export PATH=$PATH:~/.cargo/bin
47+
fi
4048
'';
4149
}

tracing-filter/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] }
9+
tracing-subscriber = { version = "0.3.18", features = [ "env-filter" ] }

0 commit comments

Comments
 (0)