Tikv: Correct style to compile tikv with latest kvproto

Created on 15 Mar 2019  路  5Comments  路  Source: tikv/tikv

Question

I have tried to compile TiKV with latest kvproto, and meet a problem about #[cfg(lib_use_protobuf]. Seems we must pass --cfg lib_use_protobuf to rustc, otherwise compile will fail.
I found that it works: export RUSTFLAGS="--cfg lib_rust_protobuf", but as you can see it's ugly. Anyone has a better solution?
@nrc @brson @breeswish please take a look if you are free, thanks!

componenbuild

All 5 comments

Looks like this is a custom condition. Can we achieve this by using features?

These should certainly be changed to #[cfg(feature = "protobuf-codec")] and #[cfg(feature = "prost-codec")] in kvproto.

I agree with @kennytm.

PTAL @nrc

This is already fixed as suggested on kvproto master.

Was this page helpful?
0 / 5 - 0 ratings