Skip to content

Commit a66d34e

Browse files
authored
Update protobuf dependencies (#150)
1 parent 31ef8bb commit a66d34e

File tree

8 files changed

+89
-47
lines changed

8 files changed

+89
-47
lines changed

Cargo.lock

Lines changed: 74 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ckb-vm-pprof-converter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ authors = ["Nervos Core Dev <dev@nervos.org>"]
1010

1111
[dependencies]
1212
clap = { version = "4.0.27", features = ["cargo"] }
13-
protobuf = { version = "2.25.1", features = ["with-bytes", "with-serde"] }
13+
protobuf = { version = "3.7", features = ["with-bytes"] }
1414
ckb-vm-pprof-protos = { path = "../ckb-vm-pprof-protos", version = "0.119.0" }

ckb-vm-pprof-converter/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
133133
samples.push(sample);
134134
}
135135
let samples_value =
136-
profile::ValueType { field_type: strings[CYCLES] as i64, unit: strings[COUNT] as i64, ..Default::default() };
136+
profile::ValueType { type_: strings[CYCLES] as i64, unit: strings[COUNT] as i64, ..Default::default() };
137137
let time_value =
138-
profile::ValueType { field_type: strings[CPU] as i64, unit: strings[NANOSECONDS] as i64, ..Default::default() };
138+
profile::ValueType { type_: strings[CPU] as i64, unit: strings[NANOSECONDS] as i64, ..Default::default() };
139139
let profile = profile::Profile {
140140
sample_type: vec![samples_value, time_value.clone()].into(),
141141
sample: samples.into(),

ckb-vm-pprof-protos/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ authors = ["Nervos Core Dev <dev@nervos.org>"]
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[build-dependencies]
12-
protoc-rust = "2.0"
12+
protobuf-codegen = "3.7"
1313

1414
[target.'cfg(target_os = "linux")'.build-dependencies]
15-
protoc-bin-vendored = "3.0.0"
15+
protoc-bin-vendored = "3.1"
1616

1717
[dependencies]
18-
protobuf = { version = "2.25.1", features = ["with-bytes", "with-serde"] }
18+
protobuf = { version = "3.7", features = ["with-bytes"] }

ckb-vm-pprof-protos/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
extern crate protoc_rust;
1+
extern crate protobuf_codegen;
22

33
fn main() {
4-
let mut codegen = protoc_rust::Codegen::new();
4+
let mut codegen = protobuf_codegen::Codegen::new();
55
#[cfg(target_os = "linux")]
66
{
7-
codegen.protoc_path(protoc_bin_vendored::protoc_bin_path().unwrap());
7+
codegen.protoc_path(&protoc_bin_vendored::protoc_bin_path().unwrap());
88
}
99
codegen.out_dir("src").inputs(&["protos/profile.proto"]).include("protos").run().expect("protoc");
1010
}

ckb-vm-pprof-protos/src/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// @generated
2+
3+
pub mod profile;

ckb-vm-signal-profiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ ckb-vm = { version = "= 0.24.12", default-features = false, features = ["asm"] }
1717
log = "0.4.16"
1818
nix = "0.23.1"
1919
lazy_static = "1.4.0"
20-
protobuf = { version = "2.25.1", features = ["with-bytes", "with-serde"] }
20+
protobuf = { version = "3.7", features = ["with-bytes"] }
2121
ckb-vm-pprof-protos = { path = "../ckb-vm-pprof-protos", version = "0.119.0" }

ckb-vm-signal-profiler/src/frames.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ impl Report {
111111
samples.push(sample);
112112
}
113113
let samples_value = protos::ValueType {
114-
field_type: strings[SAMPLES] as i64,
114+
type_: strings[SAMPLES] as i64,
115115
unit: strings[COUNT] as i64,
116116
..Default::default()
117117
};
118118
let time_value = protos::ValueType {
119-
field_type: strings[CPU] as i64,
119+
type_: strings[CPU] as i64,
120120
unit: strings[NANOSECONDS] as i64,
121121
..Default::default()
122122
};

0 commit comments

Comments
 (0)