Skip to content

Commit

Permalink
Merge pull request databendlabs#2725 from drmingdrmer/fixfix
Browse files Browse the repository at this point in the history
fixup: do not change OUT_DIR
  • Loading branch information
databend-bot authored Nov 9, 2021
2 parents 8642238 + d355010 commit b78daa2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 537 deletions.
3 changes: 2 additions & 1 deletion metasrv/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ fn build_proto() {
let manifest_dir =
env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR env variable unset");

env::set_var("OUT_DIR", "src/proto");
// Changing OUT_DIR fails docker build because src/proto is read-only.
// env::set_var("OUT_DIR", "src/proto");

let proto_dir = Path::new(&manifest_dir).join("proto");
let protos = [&Path::new(&proto_dir).join(Path::new("meta.proto"))];
Expand Down
4 changes: 3 additions & 1 deletion metasrv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#![feature(backtrace)]

#[allow(clippy::all)]
pub mod proto;
pub mod proto {
include!(concat!(env!("OUT_DIR"), concat!("/meta.rs")));
}

#[macro_use]
pub mod tests;
Expand Down
Loading

0 comments on commit b78daa2

Please sign in to comment.