Update @malloydata packages to 0.0.404; fix sync-duckdb drift detection#209
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps all
@malloydata/*deps to 0.0.404.That release moved db-duckdb's DuckDB engine from
@duckdb/node-api1.4.4-r.1 to 1.5.3-r.2, which exposed a latent bug inscripts/sync-duckdb.ts.The bug
sync-duckdbkeeps the CLI's directly-pinned@duckdbpackages (node-api, node-bindings, and the platform-specific native binding packages) in step withdb-duckdb, because the CLI bundles those native binaries into its distributable. It resolved@duckdb/node-apifrom 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-bindingsget 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
@duckdbpackages from db-duckdb's directory, so we read the version db-duckdb depends on rather than the CLI's own copy.optionalDependenciesfrom node-bindings' ownoptionalDependencies, 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).Result: a single deduped
@duckdb/*@1.5.3-r.2install, build clean, all 129 tests pass.