Skip to content

Conversation

@cameronraysmith
Copy link

No description provided.

The manifest.json directive uses an absolute path containing OUT_DIR,
which breaks cargo fingerprinting when artifacts are reused across
builds with different OUT_DIR values.

The directive is also redundant: manifest.json is extracted from
duckdb.tar.gz, which is already tracked.
@cameronraysmith
Copy link
Author

cameronraysmith commented Dec 28, 2025

fn lib_name() -> &'static str {
"duckdb"
}

// Since the manifest controls the set of files, we require it to be changed to know whether
// to rebuild the project
println!("cargo:rerun-if-changed={out_dir}/{lib_name}/manifest.json");
// Make sure to rebuild the project if tar file changed
println!("cargo:rerun-if-changed=duckdb.tar.gz");

The absolute OUT_DIR path on L142 gets baked into cargo's fingerprint. When artifacts are reused across builds with different OUT_DIR values (nix, bazel, or simply cargo clippy vs cargo build in some configurations), cargo treats the path as missing and repeatedly rebuilds libduckdb-sys.

History:

After #163, L142 became redundant. After #347, it also became non-portable. Deleting L142 fixes the portability issue with no change in rebuild semantics—L144 already covers it.

@cameronraysmith cameronraysmith marked this pull request as ready for review December 28, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant