Skip to content

Commit 4e3f5e5

Browse files
michael-0acf4Yohe-Am
authored andcommitted
fix: patch proto to latest + update script (#953)
Update protobuf-codegen and protobuff to latest (3.7.1) --- - [ ] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> - **Dependency Updates** - Updated `protobuf` library from version 3.5.1 to 3.7.1 - Updated `protobuf-codegen` crate to version 3.7.1 - **Build Configuration** - Modified protobuf compiler output option from `--rust_out` to `--rs_out` - Simplified protobuf code generation command - **Compatibility** - Ensured compatibility with latest protobuf runtime version <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 4f96a32 commit 4e3f5e5

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

Cargo.lock

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

src/substantial/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ serde.workspace = true
1010
serde_json.workspace = true
1111
uuid.workspace = true
1212

13-
protobuf = "3.6.0"
13+
protobuf = "3.7.1"
1414
# pinned due to url
1515
redis = "=0.25.4"

src/substantial/src/protocol/events.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// This file is generated by rust-protobuf 3.5.1. Do not edit
2-
// .proto file is parsed by protoc --rust_out=...
1+
// This file is generated by rust-protobuf 3.7.1. Do not edit
2+
// .proto file is parsed by protoc --rs_out=...
33
// @generated
44

55
// https://github.com/rust-lang/rust-clippy/issues/702
@@ -22,7 +22,7 @@
2222
2323
/// Generated files are compatible only with the same version
2424
/// of protobuf runtime.
25-
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_6_0;
25+
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_1;
2626

2727
// @@protoc_insertion_point(message:substantial.protos.events.Start)
2828
#[derive(PartialEq,Clone,Default,Debug)]

src/substantial/src/protocol/metadata.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// This file is generated by rust-protobuf 3.5.1. Do not edit
2-
// .proto file is parsed by protoc --rust_out=...
1+
// This file is generated by rust-protobuf 3.7.1. Do not edit
2+
// .proto file is parsed by protoc --rs_out=...
33
// @generated
44

55
// https://github.com/rust-lang/rust-clippy/issues/702
@@ -22,7 +22,7 @@
2222
2323
/// Generated files are compatible only with the same version
2424
/// of protobuf runtime.
25-
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_6_0;
25+
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_1;
2626

2727
// @@protoc_insertion_point(message:substantial.protos.metadata.Info)
2828
#[derive(PartialEq,Clone,Default,Debug)]

tools/tasks/gen.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ export default {
1919
workingDir: "src/substantial",
2020
inherit: "_rust",
2121
installs: [
22-
ports.cargobi({ crateName: "protobuf-codegen", version: "3.5.1" }),
22+
ports.cargobi({ crateName: "protobuf-codegen", version: "3.7.1" }),
2323
],
2424
fn: ($) => {
2525
// https://github.com/protocolbuffers/protobuf/issues/13346
2626
const protoFiles = [
2727
"protocol/events.proto",
2828
"protocol/metadata.proto",
2929
];
30-
return $`protoc --proto_path=. ${protoFiles} --rust_out=src/protocol --rust_opt=experimental-codegen=enabled,kernel=cpp`;
30+
31+
return $`protoc --proto_path=. ${protoFiles} --rs_out=src/protocol`;
3132
},
3233
},
3334
} satisfies Record<string, DenoTaskDefArgs>;

0 commit comments

Comments
 (0)