Skip to content

Conversation

@minggangw
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 9, 2025 07:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements prebuildify support for rclnodejs, enabling prebuilt native binaries for faster installation and deployment. The changes also vendor the ref-napi dependency and create a custom native module loader to handle prebuilt binaries with exact environment matching.

  • Integrates prebuildify to generate prebuilt native binaries tagged with Ubuntu codename and ROS2 distribution
  • Vendors ref-napi dependency to eliminate external dependency conflicts
  • Implements custom native loader with exact environment matching for prebuilt binaries

Reviewed Changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Adds prebuildify dependency and prebuild npm script
scripts/tag-prebuilds.js Script to tag prebuilt binaries with Ubuntu/ROS2 specific information
lib/native_loader.js Custom loader for prebuilt binaries with fallback to source compilation
third_party/ref-napi/ Vendored copy of ref-napi dependency with integration bindings
binding.gyp Updates build configuration for C++20 and ref-napi integration
.github/workflows/ CI workflows for generating prebuilt binaries on Linux x64/ARM64

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

it('test generate-ros-messages script installation', function (done) {
// confirm script is installed at <pgk>/node_modules/.bin/<script>
let script = createScriptFolderPath(this.tmpPkg);
console.log(script);
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Debug console.log statement should be removed from production test code.

Suggested change
console.log(script);

Copilot uses AI. Check for mistakes.
Comment on lines 101 to 105
// if (getNodeVersionInfo()[0] === 10) {
// rimraf.sync(this.tmpPkg);
// } else {
// fs.rmSync(this.tmpPkg, { recursive: true });
// }
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Commented out cleanup code should be removed or fixed. This will cause test artifacts to accumulate.

Suggested change
// if (getNodeVersionInfo()[0] === 10) {
// rimraf.sync(this.tmpPkg);
// } else {
// fs.rmSync(this.tmpPkg, { recursive: true });
// }
if (getNodeVersionInfo()[0] === 10) {
rimraf.sync(tmpPkg);
} else {
fs.rmSync(tmpPkg, { recursive: true });
}

Copilot uses AI. Check for mistakes.
@coveralls
Copy link

coveralls commented Oct 9, 2025

Coverage Status

coverage: 83.204% (-1.1%) from 84.337%
when pulling b442efd on minggangw:prebuildify
into 8762f13 on RobotWebTools:develop.

@minggangw minggangw force-pushed the prebuildify branch 6 times, most recently from 429bcad to bfee50e Compare October 10, 2025 08:00
@minggangw minggangw requested a review from Copilot October 10, 2025 09:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (3)

third_party/ref-napi/src/ref_napi_bindings.cpp:1

  • Corrected grammar in error message from 'no digits we found' to 'no digits were found'.
// Copyright (c) 2020 The ref-napi Authors.

third_party/ref-napi/src/ref_napi_bindings.cpp:1

  • Corrected grammar in error message from 'no digits we found' to 'no digits were found'.
// Copyright (c) 2020 The ref-napi Authors.

third_party/ref-napi/src/ref_napi_bindings.cpp:1

  • Corrected grammar in error message from 'no digits we found' to 'no digits were found'.
// Copyright (c) 2020 The ref-napi Authors.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

char* ptr = AddressForArgs(args);

if (ptr == nullptr) {
throw Error::New(env, "readObject: Cannot write to nullptr pointer");
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

Error message is misleading - this is in WriteObject function but says 'readObject'. Should be 'writeObject: Cannot write to nullptr pointer'.

Suggested change
throw Error::New(env, "readObject: Cannot write to nullptr pointer");
throw Error::New(env, "writeObject: Cannot write to nullptr pointer");

Copilot uses AI. Check for mistakes.
char* ptr = AddressForArgs(args);

if (ptr == nullptr) {
throw TypeError::New(env, "readInt64: Cannot read from nullptr pointer");
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

Error message is inconsistent - this is in ReadInt32 function but says 'readInt64'. Should be 'readInt32: Cannot read from nullptr pointer'.

Suggested change
throw TypeError::New(env, "readInt64: Cannot read from nullptr pointer");
throw TypeError::New(env, "readInt32: Cannot read from nullptr pointer");

Copilot uses AI. Check for mistakes.
@minggangw minggangw force-pushed the prebuildify branch 3 times, most recently from 0cd1d39 to 1c72186 Compare October 10, 2025 10:31
@minggangw
Copy link
Member Author

Abandon as splitted into #1285 #1287

@minggangw minggangw closed this Oct 13, 2025
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.

2 participants