Skip to content

Replace bindings with explicit native addon loading - #1678

Merged
minggangw merged 1 commit into
RobotWebTools:developfrom
minggangw:fix-1677
Nov 5, 2026
Merged

minggangw merged 1 commit into
RobotWebTools:developfrom
minggangw:fix-1677

Conversation

@minggangw

@minggangw minggangw commented Nov 5, 2026 •

Copy link
Copy Markdown
Member
  • Use Node.js createRequire() to load build/Debug/rclnodejs.node, then build/Release/rclnodejs.node.
  • Preserve exact-match prebuild selection, recoverable load-error handling, diagnostics, and RCLNODEJS_FORCE_BUILD behavior.
  • Remove bindings and its file-uri-to-path dependency from production installs.
  • Document supported addon locations and removal of legacy paths and NODE_BINDINGS_COMPILED_DIR.
  • Add regression coverage for lookup order, error propagation, rebuild behavior, and packed-package dependency removal.

Fix: #1677

Copilot AI balanced review requested due to automatic review settings November 5, 2026 01:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues require changes before approval.

No open issues 🎉

What changed in this PR

Replaces the bindings dependency with explicit native addon loading, limiting local lookup to node-gyp’s Debug and Release directories while retaining prebuild and source-rebuild fallbacks.

Changes:

  • Adds explicit Debug-first local addon loading with compatible lookup diagnostics and error handling.
  • Expands tests for lookup order, load failures, rebuild behavior, and dependency removal.
  • Documents supported addon locations and discontinued legacy lookup paths.
File Description
test/​test-native-loader.js Tests explicit lookup, error handling, and rebuild behavior.
test/​package/​test-package.js Checks that the installed package no longer depends on bindings.
package.json Removes the bindings dependency.
lib/​native_loader.js Replaces bindings calls with explicit local addon loading.
docs/​BUILDING.md Documents lookup order, rebuild behavior, and supported paths.

Review effort: Balanced

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 91.313% (+0.1%) from 91.177% — minggangw:fix-1677 into RobotWebTools:develop

@minggangw minggangw changed the title Replace bindings with explicit native addon loading Replace bindings with explicit native addon loading Nov 5, 2026
@minggangw
minggangw merged commit 70d631b into RobotWebTools:develop Nov 5, 2026
16 checks passed
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.

Remove bindings as dependency

3 participants