andygrove opened a new pull request, #7617:
URL: https://github.com/apache/datafusion-comet/pull/7617

   ## Which issue does this PR close?
   
   Closes #7609.
   
   ## Rationale for this change
   
   Rust 1.100 became the stable toolchain on 2026-11-12, and 
`rust-toolchain.toml` tracks `stable`, so `rust-test` now fails on every PR and 
in the merge queue. Cargo 1.100 uses its new build-dir layout, which splits the 
package name and hash into two directories:
   
   ```
   1.99.0   OUT_DIR=.../target/debug/build/<pkg>-<hash>/out
   1.100.0  OUT_DIR=.../target/debug/build/<pkg>/<hash>/out
   ```
   
   `native/core/build.rs` took the third ancestor of `OUT_DIR` to find 
`target/<profile>`, so under the new layout `COMET_TEST_UDFS_LIB` pointed at 
`target/debug/build/libcomet_test_udfs.so` instead of 
`target/debug/libcomet_test_udfs.so`. Every test that calls `test_udfs_path()` 
failed to load the library.
   
   ## What changes are included in this PR?
   
   `build.rs` now derives the profile directory as the parent of the nearest 
`build` ancestor of `OUT_DIR` instead of assuming a fixed depth. That is 
correct under both layouts, and it panics with a clear message if `OUT_DIR` is 
not inside a `build` directory.
   
   ## How are these changes tested?
   
   The existing `comet_native_udf_bridge` tests cover this: they load the 
library through `COMET_TEST_UDFS_LIB`, so they fail whenever the path is wrong. 
I did not add a unit test for the path calculation, because testing code in 
`build.rs` would mean compiling it a second time as a test target.
   
   I could not install Rust 1.100 locally, so I ran the tests with nightly 
Cargo 1.99 and `-Zbuild-dir-new-layout`, which produces the same 
`build/<pkg>/<hash>/out` layout. With the fix, all 7 `comet_native_udf_bridge` 
tests pass, including `an_exported_udf_validates`, which loads the library. 
`rust-test` in CI on the stable toolchain is the check against Rust 1.100 
itself.
   


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