diff --git a/proto/build.rs b/proto/build.rs index dd0eb6f..41c909c 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -3,10 +3,17 @@ use std::env; fn main() { let version = env!("CARGO_PKG_VERSION"); - env::set_var("TENDERDASH_COMMITISH", "v".to_owned() + version); + // check if TENDERDASH_COMMITISH is alrady set; if not, set it to the current + // version + let commitish = env::var("TENDERDASH_COMMITISH").unwrap_or_default(); + if commitish.is_empty() { + env::set_var("TENDERDASH_COMMITISH", "v".to_owned() + version); + } + tenderdash_proto_compiler::proto_compile(); println!("cargo:rerun-if-changed=../proto-compiler/src"); println!("cargo:rerun-if-changed=Cargo.toml"); println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION"); + println!("cargo:rerun-if-env-changed=TENDERDASH_COMMITISH"); } diff --git a/proto/src/prelude.rs b/proto/src/prelude.rs index aa9a20b..74cb1a7 100644 --- a/proto/src/prelude.rs +++ b/proto/src/prelude.rs @@ -1,5 +1,6 @@ // Re-export according to alloc::prelude::v1 because it is not yet stabilized // https://doc.rust-lang.org/src/alloc/prelude/v1.rs.html +#[allow(unused_imports)] pub use alloc::{ borrow::ToOwned, boxed::Box,