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

   ### What changes were proposed in this pull request?
   
   A follow-up of #619 (SPARK-61618), from its post-merge review.
   
   - `scripts/gen_binary_licenses.py` now lists only the crates that the wheels 
link, not every crate in the workspace. The set is the union, over the five 
wheel targets of `release.yml` (x86_64 and aarch64 Linux and macOS, plus x86_64 
Windows), of `cargo tree --locked -e normal,no-proc-macro -p pyspark-rs` with 
the pyo3 features that maturin builds with. That gives 141 components instead 
of 171. `cargo metadata` still supplies each crate's license and source 
directory.
   - The generator now reproduces the notices that some linked crates' source 
files carry under their own holders, which those crates' LICENSE files don't 
reproduce. They are listed in a `SUPPLEMENTARY_NOTICES` table, keyed by crate 
and version, that names the files and a marker for each notice. The generator 
copies each notice from its file at generation time, so `--check` fails when a 
crate changes it, and an entry for a crate that is no longer linked is an 
error. The entries:
     - `ring`: Google's ISC notice (`poly1305.c`, `aes_nohw.c`, `ecp_nistz.h`, 
and the chacha, gcm and poly1305 fallbacks), Intel's ISC notice, three other 
ISC holders, and its bundled once_cell MIT license.
     - `zstd-sys`: Yuta Mori's `divsufsort.c` (MIT) and Tino Reichardt's 
`threading.c` (BSD).
     - `rustls-webpki`: two ISC files.
     - `libm`: the SunPro and FreeBSD notices, and the `cbrt` MIT notice.
     - From a scan of the other linked crates: `lexical-parse-float` and 
`lexical-util` (SunPro), `futures-channel` (BSD-2), `pyo3` (MIT, `buffer.rs`) 
and `sha2-asm` (MIT assembly).
   
     Files compiled for no wheel target, such as the 32-bit ARM and x86 
sources, are left out.
   
   ### Why are the changes needed?
   
   `LICENSE-binary` listed 30 crates that no wheel links: the workspace's wasm 
examples enable features that the wheels don't. It also missed notices that 
ISC, MIT and BSD require to travel with copies. Comparing the file on master 
with this branch:
   
   - `grep -c "Google Inc" LICENSE-binary`: 0 before, 6 after.
   - `grep -c "Yuta Mori" LICENSE-binary`: 0 before, 1 after.
   - The components listed: 171 before, 141 after.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No code change. The wheels and the sdist carry a corrected `LICENSE-binary`.
   
   ### How was this patch tested?
   
   - `python3 -m unittest discover -s scripts/tests`: 77 tests pass. The new 
ones cover the target union, notice extraction and deduplication, the glob and 
plain-path rules, the stale-table error, and `--check` failing after a noticed 
file changes.
   - `python3 scripts/gen_binary_licenses.py --check` passes.
   - A maturin sdist and a host wheel (macOS arm64) carry the four license 
files byte-identical to the repository, with matching `License-File` entries. 
The other targets were checked at the `cargo tree` level.
   - `cargo fmt`, the stub audit, the Rust lib tests and ruff pass.
   
   ### 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