You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlparser_derive embeds its build-time manifest directory in the proc-macro binary #2724
sqlparser_derive 0.6.0 embeds its build-time CARGO_MANIFEST_DIR in the proc-macro binary through DERIVE_CRATE_DIR in read_dialect_mod_file. Changing only that environment value changes the final binary, even without incremental compilation or debug info. Under Bazel this is a temporary sandbox path, so identical recorded action inputs produce different outputs and the cached macro retains the producer's source location.
This is also a source-tree dependency during macro expansion, independent of Bazel: derive_dialect! reads sqlparser/src/dialect/mod.rs to discover the Dialect method signatures. Compiled dependencies alone are insufficient; expansion fails if none of the searched source trees is present.
The repro compiles the same published source twice with the same dependencies and rustc arguments, changing only /tmp/sqlparser-a to /tmp/sqlparser-b:
The proposed fix in #2725 stores those signatures as macro tokens in the compiled sqlparser library, which passes them to the proc macro during expansion. The proc-macro binary and compiled sqlparser dependency are sufficient; neither crate's source tree needs to remain available. Verified by building both crates, deleting their source trees, then compiling and running a consumer: this fails on unpatched upstream and passes with the fix.
Sorry for the over comprehensive codex issue. TLDR; the CARGO_MANIFEST_DIR is leaked into release .so due to build.rs. Which makes this crate unreproducible and causes cache miss on ci, which uses temp built paths each time.
Activity
alamb commentedon Nov 4, 2026
What is the repro? Please post it to this ticket rather than relying on us to download and run a script from github
alamb commentedon Nov 4, 2026
This ticket needs to be clearer about what you aretrying to do and what is wrong
ashi009 commentedon Nov 4, 2026
Repro is at https://gist.github.com/ashi009/595a35ecfc805046695680b837d79cc5
Sorry for the over comprehensive codex issue. TLDR; the CARGO_MANIFEST_DIR is leaked into release .so due to build.rs. Which makes this crate unreproducible and causes cache miss on ci, which uses temp built paths each time.