Skip to content

Replace ref-array-di and ref-struct-di dependencies with local copies - #1635

Merged
minggangw merged 1 commit into
RobotWebTools:developfrom
minggangw:integrate-dependency
Oct 16, 2026
Merged

minggangw merged 1 commit into
RobotWebTools:developfrom
minggangw:integrate-dependency

Conversation

@minggangw

@minggangw minggangw commented Oct 16, 2026 •

Copy link
Copy Markdown
Member
  • Consolidate the two internally maintained, rclnodejs-only adapters so their development, testing, and releases can be coordinated without separate package publication steps.
  • Vendor @rclnodejs/[email protected] and @rclnodejs/[email protected] under third_party/, preserving their production JavaScript and MIT licenses byte-for-byte.
  • Add private CommonJS manifests and retain dependency injection through the existing local ref-napi implementation, including PointerBuffer support.
  • Replace scoped npm imports in primitive types and generated messages with local adapter paths, and declare array-index directly.
  • Protect vendored sources from automatic formatting and document source provenance, maintenance rationale, and continued availability of published helper versions for older rclnodejs releases.
  • Add six focused regression tests for struct layout, packing, nested arrays, copy semantics, pointer round trips, and PointerBuffer-backed access.

Fix: #1636

Copilot AI balanced review requested due to automatic review settings October 16, 2026 06:18

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

The unchanged adapter sources, import updates, dependency changes, and cache invalidation are consistent, with regression coverage and no unresolved findings.

0 open findings

What changed in this PR

Vendors the project-maintained array and struct adapters alongside local ref-napi, replacing their npm dependencies without changing adapter behavior.

Changes:

  • Adds adapter sources, licenses, and CommonJS package boundaries.
  • Updates imports and generator version to invalidate cached interfaces.
  • Adds compatibility tests and documents vendoring maintenance.
File Description
third_party/​ref-struct-di/​package.json Defines the struct adapter’s CommonJS boundary.
third_party/​ref-struct-di/​LICENSE Preserves the MIT license.
third_party/​ref-struct-di/​lib/​struct.js Vendors the struct adapter.
third_party/​ref-array-di/​package.json Defines the array adapter’s CommonJS boundary.
third_party/​ref-array-di/​LICENSE Preserves the MIT license.
third_party/​ref-array-di/​lib/​array.js Vendors the array adapter.
third_party/​README.md Documents provenance and maintenance.
test/​test-ref-types.js Covers adapter behavior and pointer compatibility.
test/​package/​test-package.js Checks packaged files and cache regeneration.
test/​package/​consumer.mjs Verifies installed vendored adapters resolve.
rosidl_gen/​templates/​message-template.cjs Generates imports for local adapters.
rosidl_gen/​primitive_types.cjs Uses the local struct adapter.
rosidl_gen/​generator.json Bumps the cache-invalidation version.
package.json Replaces scoped adapters with array-index.
docs/​BUILDING.md Explains packaging and regeneration changes.
.prettierignore Preserves upstream adapter formatting.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coveralls

coveralls commented Oct 16, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 91.148% (+0.001%) from 91.147% — minggangw:integrate-dependency into RobotWebTools:develop

@minggangw
minggangw force-pushed the integrate-dependency branch from 89c8120 to 3a93bcc Compare October 16, 2026 06:40
@minggangw minggangw changed the title Vendor project-maintained ref array and struct adapters Replace ref-array-di and ref-struct-di dependencies with local copies Oct 16, 2026
@minggangw
minggangw requested a balanced review from Copilot October 16, 2026 07:08

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

The adapters preserve existing behavior, and no blocking issues were identified in the focused integration changes.

0 open findings

🧠 Review effort: Balanced

@minggangw
minggangw merged commit 35e95e7 into RobotWebTools:develop Oct 16, 2026
17 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.

Replace ref-array-di and ref-struct-di dependencies with local copies

3 participants