Skip to content

fix(napi): use base package name @databricks/sql-kernel so the platform router resolves - #93

Closed
msrathore-db wants to merge 4 commits into
mainfrom
msrathore/krn-napi-pkg-name
Closed

msrathore-db wants to merge 4 commits into
mainfrom
msrathore/krn-napi-pkg-name

Conversation

@msrathore-db

@msrathore-db msrathore-db commented May 30, 2026 •

Copy link
Copy Markdown
Collaborator

What

Small main-based fix PR for the napi package name and the remaining napi CI registry setup.

Current real diff after merging latest main: about 10 additions / 2 deletions across 2 files.

Included Changes

  • Changes napi/package.json to use the base package name @databricks/sql-kernel instead of the platform-specific package name. This keeps napi-rs generated require paths from duplicating the target triple, e.g. avoiding @databricks/sql-kernel-linux-x64-gnu-linux-x64-gnu.
  • Adds JFrog cargo proxy setup to the napi checks workflow with the required OIDC permission. This avoids direct crates.io access from Databricks protected runners.
  • The earlier doctest/rustfmt and pr-checks.yml changes from this branch are now already present on latest main, so they no longer appear in the real PR diff.

Review Notes

This PR is intentionally separate from the large SEA parity bundle because it is a small packaging/CI correctness fix. It has been merged with latest main; the displayed diff is now the real remaining difference.

Testing

Previous CI rerun after the fixes passed formatting, clippy, unit/doc tests, coverage, Build (tls-rustls feature), and napi fmt + clippy + test. CI is rerunning after the latest main merge.

This pull request and its description were written by Isaac.

…rm router resolves

The napi crate's package.json `name` was set to the per-platform name
`@databricks/sql-kernel-linux-x64-gnu`. napi-rs derives the per-platform
require paths in the generated `index.js` router as `${name}-${triple}`,
so a per-platform base name produced doubled, unresolvable specifiers
like `@databricks/sql-kernel-linux-x64-gnu-linux-x64-gnu`. Any consumer
relying on the published optional dependency (rather than a locally
copied `.node`) would hit MODULE_NOT_FOUND.

Set `name` to the base `@databricks/sql-kernel`; the per-platform
packages are auto-named `@databricks/sql-kernel-<triple>` by napi-rs and
the router now emits single-prefix, resolvable require paths.

Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
# Conflicts:
#	.github/workflows/pr-checks.yml
@msrathore-db

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #101. The #101 mega PR now contains this branch's package-name router fix and napi JFrog CI setup in the single squashed main-based review commit.

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