Skip to content

Commit bd926d7

Browse files
authored
Add explicit LYRICAL distro identifier (2605) (#1488)
Register the upcoming **ROS 2 Lyrical Luth** (May 2026) distribution so that distro-gated code paths activate correctly when `ROS_DISTRO=lyrical` is set, rather than falling through to the `FUTURE` sentinel. **Changes** | File | What changed | |------|-------------| | `lib/distro.js` | Added `LYRICAL: 2605` to `DistroId` enum and `DistroNameIdMap` | | `test/test-distro.js` | Replaced brittle exact-count assertion with `expectedDistros` array that verifies each known distro (including `lyrical`) is present via `includes()` | **Why 2605?** Follows the existing `YYMM` convention — Lyrical targets May 2026 GA. Fix: #1458
1 parent e0ae6de commit bd926d7

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

lib/distro.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const DistroId = {
2626
IRON: 2305,
2727
JAZZY: 2405,
2828
KILTED: 2505,
29+
LYRICAL: 2605,
2930
ROLLING: 5000,
3031
FUTURE: 9999, // unrecognized ROS_DISTRO assumed newer than Rolling
3132
};
@@ -38,6 +39,7 @@ DistroNameIdMap.set('humble', DistroId.HUMBLE);
3839
DistroNameIdMap.set('iron', DistroId.IRON);
3940
DistroNameIdMap.set('jazzy', DistroId.JAZZY);
4041
DistroNameIdMap.set('kilted', DistroId.KILTED);
42+
DistroNameIdMap.set('lyrical', DistroId.LYRICAL);
4143
DistroNameIdMap.set('rolling', DistroId.ROLLING);
4244

4345
const DistroUtils = {

test/test-distro.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,27 @@ describe('rclnodejs distro utils', function () {
2323

2424
const distroNames = DistroUtils.getKnownDistroNames();
2525
assert.ok(
26-
distroNames,
26+
distroNames && distroNames.length > 0,
2727
'DistroUtils.getKnownDistroNames() did not return any distro names'
2828
);
29-
assert.equal(
30-
distroNames.length,
31-
8,
32-
'Incorrect number of known distro names'
33-
);
29+
30+
const expectedDistros = [
31+
'eloquent',
32+
'foxy',
33+
'galactic',
34+
'humble',
35+
'iron',
36+
'jazzy',
37+
'kilted',
38+
'lyrical',
39+
'rolling',
40+
];
41+
for (const name of expectedDistros) {
42+
assert.ok(
43+
distroNames.includes(name),
44+
`Expected distro '${name}' not found in known distro names`
45+
);
46+
}
3447

3548
distroNames.forEach((distroName) => {
3649
let id = DistroUtils.getDistroId(distroName);

0 commit comments

Comments
 (0)