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.
Activity