Skip to content

Commit fdabb37

Browse files
authored
Fix helm-sys rebuilding itself on no-op changes (#330)
1 parent f73001a commit fdabb37

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rust/helm-sys/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ fn main() {
5555

5656
let bindings = bindgen::builder()
5757
.header(build_path.join("libgo-helm-wrapper.h").to_str().unwrap())
58-
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
58+
.parse_callbacks(Box::new(
59+
bindgen::CargoCallbacks::new()
60+
// libgo-helm-wrapper.h will *always* just have been rebuilt here by the gobuild above
61+
// (and, conversely, if the gobuild *has* been rebuilt then we'll already be rebuilding the crate anyway)
62+
.rerun_on_header_files(false),
63+
))
5964
.generate()
6065
.expect("Failed to generate Rust bindings from Go header file");
6166

0 commit comments

Comments
 (0)