RustySecrets icon indicating copy to clipboard operation
RustySecrets copied to clipboard

Build failure when added as a dependency

Open dingxiangfei2009 opened this issue 7 years ago • 2 comments

Since protobuf has removed MessageStatic in version 1.6.0, including rusty_secrets as a dependency in Cargo.toml now leads to build failure.

To reproduce this, create a new Rust project with cargo new, add the dependency rusty_secrets = "0.2.1" and build this project with cargo build. This happens even though protobuf version is pinned to 1.5.1 in the Cargo.lock file.

dingxiangfei2009 avatar May 17 '18 00:05 dingxiangfei2009

Ouch, sorry about that, and thanks for the report!

I have just released version 0.2.2 which restricts protobuf to >=1.4 and <1.6, which should fix the issue for now. I will release version 0.3.0 in the next few days, which will come with protobuf 1.6.

Let me know if that works for you

romac avatar May 17 '18 08:05 romac

I have a small idea. Maybe we can use protoc_rust to trans-compile .proto schemata into Rust sources inside the build.rs file, so that they are re-generated every time it is compiled.

Let me prepare a pull request. You may see whether this approach is suitable. :)

dingxiangfei2009 avatar May 17 '18 09:05 dingxiangfei2009