Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/distro.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const DistroId = {
IRON: 2305,
JAZZY: 2405,
KILTED: 2505,
LYRICAL: 2605,
ROLLING: 5000,
FUTURE: 9999, // unrecognized ROS_DISTRO assumed newer than Rolling
Comment on lines 26 to 31

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

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

Adding LYRICAL: 2605 changes getDistroId('lyrical') from the FUTURE sentinel (9999) to 2605, which will make all >= DistroId.ROLLING feature gates evaluate false on Lyrical. There are several such gates (e.g., lib/node.js:1590/1624, lib/subscription.js:154, lib/action/client.js:102), so Lyrical will now be treated as not supporting those Rolling-gated features. If Lyrical is expected to include those APIs (as a stable release branched from Rolling), update those checks to include DistroId.LYRICAL (or introduce a helper like “isRollingOrNewerStable()” / “isAtLeastDistroName()”) so behavior doesn’t regress compared to the previous FUTURE fallback.

Copilot uses AI. Check for mistakes.
};
Expand All @@ -38,6 +39,7 @@ DistroNameIdMap.set('humble', DistroId.HUMBLE);
DistroNameIdMap.set('iron', DistroId.IRON);
DistroNameIdMap.set('jazzy', DistroId.JAZZY);
DistroNameIdMap.set('kilted', DistroId.KILTED);
DistroNameIdMap.set('lyrical', DistroId.LYRICAL);
DistroNameIdMap.set('rolling', DistroId.ROLLING);

const DistroUtils = {
Expand Down
25 changes: 19 additions & 6 deletions test/test-distro.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,27 @@ describe('rclnodejs distro utils', function () {

const distroNames = DistroUtils.getKnownDistroNames();
assert.ok(
distroNames,
distroNames && distroNames.length > 0,
'DistroUtils.getKnownDistroNames() did not return any distro names'
);
assert.equal(
distroNames.length,
8,
'Incorrect number of known distro names'
);

const expectedDistros = [
'eloquent',
'foxy',
'galactic',
'humble',
'iron',
'jazzy',
'kilted',
'lyrical',
'rolling',
];
for (const name of expectedDistros) {
assert.ok(
distroNames.includes(name),
`Expected distro '${name}' not found in known distro names`
);
}

distroNames.forEach((distroName) => {
let id = DistroUtils.getDistroId(distroName);
Expand Down
Loading