Repository navigation
Replace bindings with explicit native addon loading - #1678
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 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
bindings with explicit native addon loading
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.
createRequire()to loadbuild/Debug/rclnodejs.node, thenbuild/Release/rclnodejs.node.RCLNODEJS_FORCE_BUILDbehavior.bindingsand itsfile-uri-to-pathdependency from production installs.NODE_BINDINGS_COMPILED_DIR.Fix: #1677