c-thiel opened a new issue, #27797:
URL: https://github.com/apache/datafusion/issues/27797

   ### Describe the bug
   
   `get_data_dir` in `datafusion_common::test_util` uses 
`env!("CARGO_MANIFEST_DIR")` as a fallback. Because `test_util` is always 
compiled, every build of `datafusion-common` contains the full path of the 
folder it was built in. `--remap-path-prefix` can't remove it, because it 
doesn't touch string literals.
   
   So builds are not reproducible. We hit this with Bazel (`rules_rust`): the 
build path changes on every run, so the output never matches the cache, and 
some setups even fail the build.
   
   The fallback only helps inside a DataFusion git checkout. When DataFusion 
comes from crates.io, the path it points to doesn't exist.
   
   ### To Reproduce
   
       RUSTFLAGS="--remap-path-prefix=$PWD=." cargo build -p datafusion-common
       grep -c -a -F "$PWD" target/debug/deps/libdatafusion_common-*.rlib
       # prints 1
   
   ### Expected behavior
   
   After remapping, the build contains no absolute path.
   
   ### Additional context
   
   arrow-rs has similar helpers, but only compiles them with its `test_utils` 
feature.
   
   ### Willingness to contribute
   
   I plan to contribute a fix for this bug independently


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to