Skip to content

Commit 996fff2

Browse files
committed
Don’t rebuild library when tests changes.
Cargo’s default is to re-run build scripts (and therefore rebuild stuff) whenever any file changes. We can be more precise.
1 parent 13a554e commit 996fff2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ fn main() {
2929

3030
named_entities_to_phf(
3131
&Path::new(&manifest_dir).join("data/entities.json"),
32-
&Path::new(&env::var("OUT_DIR").unwrap()).join("named_entities.rs"))
32+
&Path::new(&env::var("OUT_DIR").unwrap()).join("named_entities.rs"));
33+
34+
println!("cargo:rerun-if-changed={}", rules_rs.display());
3335
}
3436

3537
#[cfg(feature = "codegen")]

0 commit comments

Comments
 (0)