Skip to content

Update @malloydata packages to 0.0.404; fix sync-duckdb drift detection#209

Merged
mtoy-googly-moogly merged 1 commit into
mainfrom
mtoy/malloy-0.0.404
Jun 4, 2026
Merged

Update @malloydata packages to 0.0.404; fix sync-duckdb drift detection#209
mtoy-googly-moogly merged 1 commit into
mainfrom
mtoy/malloy-0.0.404

Conversation

@mtoy-googly-moogly
Copy link
Copy Markdown
Contributor

Bumps all @malloydata/* deps to 0.0.404.

That release moved db-duckdb's DuckDB engine from @duckdb/node-api 1.4.4-r.1 to 1.5.3-r.2, which exposed a latent bug in scripts/sync-duckdb.ts.

The bug

sync-duckdb keeps the CLI's directly-pinned @duckdb packages (node-api, node-bindings, and the platform-specific native binding packages) in step with db-duckdb, because the CLI bundles those native binaries into its distributable. It resolved @duckdb/node-api from the CLI's own node_modules — which is the CLI's pin itself — so it always compared a version to itself and reported "already in sync." It never looked at what db-duckdb actually needs.

With the versions now diverged, two copies of @duckdb/node-bindings get installed (the CLI's stale 1.4.4 at top level, db-duckdb's 1.5.3 nested). The esbuild build reads its externals from the stale top-level copy, so it fails to resolve the platforms 1.5.3 added (linux-arm64-musl, linux-x64-musl, win32-arm64).

The fix

  • Resolve the @duckdb packages from db-duckdb's directory, so we read the version db-duckdb depends on rather than the CLI's own copy.
  • Rebuild optionalDependencies from node-bindings' own optionalDependencies, so platforms added by future DuckDB releases are picked up automatically (it previously only rewrote versions of platform keys already present, so it could never add new ones).
  • Validate everything before writing, fail with a single actionable line, sort output so re-runs don't churn the diff.

Result: a single deduped @duckdb/*@1.5.3-r.2 install, build clean, all 129 tests pass.

Bumps all @malloydata/* deps to 0.0.404. That release moved db-duckdb's
DuckDB engine from @duckdb/node-api 1.4.4-r.1 to 1.5.3-r.2, which exposed
a latent bug in scripts/sync-duckdb.ts.

sync-duckdb keeps the CLI's directly-pinned @duckdb packages (node-api,
node-bindings, and the platform-specific native binding packages) in step
with db-duckdb, since the CLI bundles those binaries. It resolved
@duckdb/node-api from the CLI's own node_modules, which is the CLI's pin
itself, so it always compared a version to itself and reported "in sync" --
it never looked at what db-duckdb actually needs. With the versions now
diverged, two copies of node-bindings get installed and esbuild
externalizes the stale platform list, failing the build on the platforms
1.5.3 added (linux-*-musl, win32-arm64).

Fixes:
- Resolve the @duckdb packages from db-duckdb's directory, so we read the
  version db-duckdb depends on rather than the CLI's own copy.
- Rebuild optionalDependencies from node-bindings' own optionalDependencies
  so newly-added platforms are picked up automatically (previously it only
  rewrote versions of platform keys already present).
- Validate before writing, fail with actionable messages, sort output.

Build clean, all 129 tests pass.
@mtoy-googly-moogly mtoy-googly-moogly merged commit 5576097 into main Jun 4, 2026
5 checks passed
@mtoy-googly-moogly mtoy-googly-moogly deleted the mtoy/malloy-0.0.404 branch June 4, 2026 01:39
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