LeonHartley / Coerce-rs

Actor runtime and distributed systems framework for Rust
713 stars 23 forks source link

Unable to build with 0.8.10 #32

Closed knepe closed 1 year ago

knepe commented 1 year ago

Hey,

I'm using latest coerce version, but I'm getting a build error:

`error[E0425]: cannot find value VERSION_3_2_0 in crate protobuf --> /home/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coerce-0.8.10/src/remote/net/proto/network.rs:26:49 26 const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_3_3_0
7 pub const VERSION_3_3_0: () = ();
--------------------------- similarly named constant VERSION_3_3_0 defined here`

I tried checking if I had any other dependency on protobuf 3.3.0 but it looks like it comes from coerce if I do cargo tree

knepe commented 1 year ago

It compiles if I add protobuf = "=3.2.0" to my Cargo.toml

LeonHartley commented 1 year ago

That's interesting! Coerce does not depend on protobuf 3.3.0, so you may have another dependency in your project that uses it.

AdriaanPrinsloo commented 1 year ago

@knepe I have the same issue with my CI. I suspect the problem is that protobuf does exact version checks in generated files, but if we don't include the specific "=3.2.0" version when you bring it in, cargo will automatically get the latest 3.X.X version if it's available, causing a version mismatch when it compiles the generated file. @LeonHartley I suspect we don't see this issue in the Coerce codebase because we version control the Cargo.lock file.

LeonHartley commented 1 year ago

Thanks guys, @AdriaanPrinsloo has hopefully resolved this, I will aim to release 8.11 this evening.

AdriaanPrinsloo commented 1 year ago

@LeonHartley, Is there anything I can do to help get 8.11 out the door?

LeonHartley commented 1 year ago

Sorry for the delay, it was a very busy week for me. I have published 0.8.11 now!

AdriaanPrinsloo commented 1 year ago

No worries man, I didn't mean to put any pressure on you, just thought if I could help in some way, I'd offer. Thanks for the release, that's wonderful!

LeonHartley commented 1 year ago

Yeah, no problem at all, I really do need to automate publishing before the next release!

LeonHartley commented 1 year ago

@knepe Please could you try the latest release (0.8.11) and let me know that this issue is now resolved? :)

knepe commented 1 year ago

@LeonHartley @AdriaanPrinsloo Just tested, works perfect. Thanks guys :)