Commit cfb281e
[.github/workflows/ci.yml,sdk/nodejs/package.json] fix CI: macOS PyO3 linker + Windows node test glob
First CI run on this PR surfaced two environment-specific
issues that didn't repro on my macOS dev box:
1. `rust (macos-latest)` — `cargo build --workspace --all-targets`
failed linking the test binary for `sqlrite-python` +
`sqlrite-nodejs`. Those are PyO3 / napi-rs extension-module
cdylibs; `extension-module` on PyO3 tells rustc not to link
libpython, and napi-rs does the same for the Node symbols.
On macOS the auto-generated `cargo test` binary for their
rlib targets then fails at link time with unresolved Python
symbols (`pyo3::err::panic_after_error` et al).
Fix: exclude both crates from the rust-build-and-test + rust-
lint jobs. Their test coverage lives in the per-SDK jobs
(python-sdk + nodejs-sdk), which exercise them through
maturin / napi-rs — the native tooling knows how to handle
the extension-module link. Added an explanatory comment at
the exclude block so the next person doesn't accidentally
re-include them.
2. `nodejs-sdk (windows-latest)` — `npm test` failed with
"Could not find 'D:\…\sdk\nodejs\test\*.mjs'". Git Bash on
Windows doesn't glob-expand `*.mjs` the way bash on
Linux/macOS does; the literal string is passed through to
node's `--test` runner, which then can't find a file named
`*.mjs`.
Fix: hardcode the one test file path in `scripts.test`:
`node --test test/test.mjs`. Works identically on all three
OSes. If/when we add a second test file, we'll switch to a
glob-expansion helper (maybe `find test -name '*.mjs' -exec
node --test {} +`) or native Node.js directory discovery.
Verified locally with the corrected commands:
- `cargo build --workspace --exclude sqlrite-desktop --exclude
sqlrite-python --exclude sqlrite-nodejs --all-targets` ✓
- `cargo test` with same exclusions ✓ (183 pass)
- `cargo clippy` with same exclusions ✓
- `cargo doc` with same exclusions ✓
- `cd sdk/nodejs && npm ci && npm run build && npm test` ✓
(11 pass)
The other two Rust SDKs (ffi + wasm) still get built +
tested via their own workspace memberships — only extension-
module crates need the exclusion. Desktop stays excluded for
the existing frontend-build reason (no change there).
No functional code changes — CI config + one package.json
script tweak.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 63a62e8 commit cfb281e
2 files changed
Lines changed: 42 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
76 | 94 | | |
77 | | - | |
78 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
| |||
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
106 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
107 | 137 | | |
108 | 138 | | |
109 | 139 | | |
110 | 140 | | |
111 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
112 | 147 | | |
113 | 148 | | |
114 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments