ci: js-sys is not C in the no-C check

The check matches any *-sys crate, and clawhdf5-wasm pulls in js-sys,
wasm-bindgen's bindings to JavaScript, which compiles no C. Exempt it
by name so the check keeps catching real C for the wasm crate.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-26 00:14:30 -05:00
co-authored by Claude Opus 5.5
parent 34987ec194
commit 5461a13984
+3 -1
View File
@@ -89,6 +89,7 @@ run_step "cargo clippy (fast-deflate / zlib-ng)" cargo clippy \
# that: fail if a crate that compiles C (a *-sys crate, cc or cmake) enters the # that: fail if a crate that compiles C (a *-sys crate, cc or cmake) enters the
# default dependency tree of any of them. clawhdf5-migrate (bundled SQLite), # default dependency tree of any of them. clawhdf5-migrate (bundled SQLite),
# clawhdf5-napi (Node) and clawhdf5-gpu (graphics drivers) are exempt. # clawhdf5-napi (Node) and clawhdf5-gpu (graphics drivers) are exempt.
# js-sys (clawhdf5-wasm's bindings to JavaScript) builds no C.
no_c_in_default_build() { no_c_in_default_build() {
local crate found=0 local crate found=0
for crate in clawhdf5-format clawhdf5-io clawhdf5-filters clawhdf5 \ for crate in clawhdf5-format clawhdf5-io clawhdf5-filters clawhdf5 \
@@ -96,7 +97,8 @@ no_c_in_default_build() {
clawhdf5-wasm; do clawhdf5-wasm; do
local c_deps local c_deps
c_deps=$(cargo tree -q -p "$crate" -e normal,build --prefix none \ c_deps=$(cargo tree -q -p "$crate" -e normal,build --prefix none \
| grep -E '^([a-z0-9_-]+-sys|cc|cmake) v' | sort -u) | grep -E '^([a-z0-9_-]+-sys|cc|cmake) v' \
| grep -v '^js-sys v' | sort -u)
if [ -n "$c_deps" ]; then if [ -n "$c_deps" ]; then
echo "$crate pulls in C by default:" echo "$crate pulls in C by default:"
echo "$c_deps" | sed 's/^/ /' echo "$c_deps" | sed 's/^/ /'