HyukjinKwon opened a new pull request, #580:
URL: https://github.com/apache/spark-connect-rust/pull/580

   ### What changes were proposed in this pull request?
   
   Rust 1.100.0 (2026-11-09), which CI's `rustup toolchain install stable` now 
installs, changed the layout of cargo's build directory. The artifacts of each 
unit are in a directory of their own, 
`target/<profile>/build/<package>/<hash>/out`, which is also the `OUT_DIR` of a 
build script, and there is no `target/<profile>/deps` any more. Two places 
assumed the old layout:
   
   - `crates/spark-connect-build` (`apache-spark-connect-build`, the `build.rs` 
helper of WASM UDFs) found the `spark_connect_macros` proc-macro dylib in 
`OUT_DIR/../../../deps`. On Rust 1.100 that is `target/debug/build/deps`, so it 
panics: `could not find the spark_connect_macros proc-macro dylib in 
.../target/debug/build/deps`. This fails the WASM UDF feature and Rust 
behavioral e2e jobs, and any user crate that calls `embed_wasm_udf` on Rust 
1.100.
   - `scripts/check_doc_snippets.py` compiled the doc snippets with `-L 
dependency=target/debug/deps`, so all 52 fail with ``can't find crate for 
`spark_connect_core` ``. This fails the docs job.
   
   The changes:
   - The helper looks for the dylib in `<profile>/deps` (before Rust 1.100), 
and in the `out` directories of the units of `apache-spark-connect-macros` 
(from Rust 1.100). It takes the newest dylib, as before, and also takes the 
`.dll` of Windows, which has no `lib` prefix. A proc-macro dylib is loaded 
without its dependencies, so the wasm build needs only the directory of the 
dylib.
   - The snippet check reads the rlib of `apache-spark-connect`, and the 
directories of its dependencies' artifacts, from `cargo build -p 
apache-spark-connect --message-format=json`, which reports fresh units too. So 
it does not depend on the layout.
   
   ### Why are the changes needed?
   
   CI fails on every pull request and on master since its stable toolchain 
became 1.100.0: master's last green run used 1.99.1. For example, see #577.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `spark_connect_build::embed_wasm_udf` works on Rust 1.100, where it 
panicked.
   
   ### How was this patch tested?
   
   - With Rust 1.100.0 and with 1.96.0, each with a fresh target directory: 
`examples/wasm-udf-inline` builds and embeds its `.wasm`, and 
`check_doc_snippets.py` compiles all 52 snippets.
   - On Rust 1.100.0: `cargo build -p pyspark-rs` (no warnings), `cargo test -p 
apache-spark-connect --no-run` with and without `wasm-udf`, the lib tests of 
`apache-spark-connect`, `-core` and `-build` (638, 0 and 218 passed), and 
`cargo test --manifest-path tests/wasm-udf/Cargo.toml --no-run`. Its only 
output is a new cargo lint, "unused dependency `spark-connect-macros`", for the 
build-dependency that the helper needs built.
   - `cargo fmt --all --check`, `ruff check` and `ruff format --check`.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5
   
   This pull request and its description were written by Isaac.
   


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