Skip to content

Whole project rebuilds every time #7

@koxu1996

Description

@koxu1996

Project build cache is broken when using tonic-buf-build in build.rs, for example:

fn main() {
  println!("cargo::rerun-if-changed=proto");

  let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
  let mut config = prost_build::Config::new();

  tonic_buf_build::compile_from_buf_workspace(
    tonic_build::configure().build_client(true).out_dir(out_dir),
    Some(config),
  )
  .unwrap();
}

Even with no changes, every cargo build takes few seconds and it runs build script again... That makes this library unusable, as it basically breaks the responsivness of IDE's intellisense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions