Skip to content

Bun and Deno in CI, and the stack a native error was missing - #8

Merged
tamnd merged 1 commit into
mainfrom
runtimes
Aug 18, 2026
Merged

Bun and Deno in CI, and the stack a native error was missing#8
tamnd merged 1 commit into
mainfrom
runtimes

Conversation

@tamnd

@tamnd tamnd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

One binary serves Node, Bun and Deno, because N-API is the ABI all three implement, and the runtimes table has claimed all three since the first commit. Only Node ran anything, which makes a table like that a promise rather than a fact, so the whole suite now runs on Bun 1.3 and Deno 2.9 in CI beside Node 24 and 26. Both of them found something.

Bun found a native error carrying no stack at all. V8 writes one when the error is made and JavaScriptCore writes none through N-API, so err.stack was undefined there and every logger that reaches for it printed that word instead of the failure. What V8 writes for an error made under a running statement is the header line and no frames, since there are no JavaScript frames beneath a native call that is already running, so that line is what this writes when it finds none. It is defined rather than assigned, because the one V8 writes is not enumerable: a plain assignment put stack into Object.keys(err) on Bun and nowhere else, and the test that walks an error's own keys is what caught it, which is the second bug this job found on its first run.

Deno needed a permission list rather than a -A that proves nothing, and --allow-read --allow-write --allow-env --allow-ffi is what the suite actually uses, so that is what the job and the README both say now. It also needs --no-check, which is about the checkout and not about the package: the tests reach the declarations by relative path here rather than through npm:zudb, and Deno reads the .cjs beside them as a module with an export = in it. The package job is what checks the types, through the resolution a user actually gets, and it is unchanged.

Deno 2.9 has Temporal unflagged, so the temporal tests run there without anything being asked for. Bun 1.3 does not have it yet, and the suite skips those two the way it does on an unflagged Node.

Four runs, all green: npm test and npm run test:temporal on Node, npm run test:bun, npm run test:deno, 90 tests each and 88 passing wherever Temporal exists. cargo fmt --check, cargo clippy --all-features -- -D warnings and npm run check:types are green too.

Closes the last TypeScript line of DX3, tamnd/zu#169.

One binary serves Node, Bun and Deno, because N-API is the ABI all
three implement. What made that a claim rather than a fact is that only
Node ran anything, so the whole suite now runs on Bun 1.3 and Deno 2.9
as well, and both found something.

Bun found a native error with no `stack` at all. V8 writes one when the
error is made and JavaScriptCore writes none through N-API, so on Bun
`err.stack` was `undefined` and every logger reaching for it printed
that word instead of the failure. The header line is what the other
runtimes have there, since an error made under a running statement has
no JavaScript frames beneath it anyway, so this writes that line when
it finds none. Defined rather than assigned, because the one V8 writes
is not enumerable and a plain assignment would have put `stack` in
`Object.keys(err)` on one runtime and not the other three, which is a
difference every structured logger would print.

Deno needed `--allow-read --allow-write --allow-env --allow-ffi`, which
is now the list the job runs with rather than a `-A` that proves
nothing, and `--no-check` for the checkout: the tests reach the
declarations by relative path here rather than through `npm:zudb`, and
Deno reads the `.cjs` beside them as a module with an `export =` in it.
The package job is what checks the types, through the resolution a user
actually gets.

`npm run test:bun` and `npm run test:deno` run the same suite locally.
Node 24 also runs it a second time with `--harmony-temporal`, and 26
has Temporal unflagged, so all four runs are green: 90 tests, 88 of
them wherever Temporal exists.
@tamnd
tamnd merged commit 62d8fb9 into main Aug 18, 2026
18 of 19 checks passed
@tamnd
tamnd deleted the runtimes branch August 18, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant