Hi, thanks for maintaining this great library!
Problem
Starting with Ubuntu 24.04 (Noble), the libexpected-dev package (v1.1.0) is available from the official Ubuntu repository. This package installs the header at /usr/include/tl/expected.hpp.
Meanwhile, generate_parameter_library depends on the ROS tl_expected package, which installs the same library at a different path: <prefix>/include/tl_expected/expected.hpp.
Both headers are from the same upstream project (TartanLlama/expected) but at different versions:
| Package |
Version |
Include path |
libexpected-dev (Ubuntu 24.04) |
1.1.0 |
tl/expected.hpp |
ros-jazzy-tl-expected (ROS) |
1.0.1 |
tl_expected/expected.hpp |
Both headers use the same header guard (TL_EXPECTED_HPP) and the same namespace (tl), so whichever is included first silently suppresses the other. This can cause subtle version mismatch issues and confuses tools like IWYU (include-what-you-use) about which path is canonical.
Since generate_parameter_library generates code that users include in their own packages, this issue affects all downstream consumers — not just this library itself. Any package using a generated parameter library will transitively pull in tl_expected/expected.hpp via rsl/parameter_validators.hpp and parameter_traits/parameter_traits.hpp, potentially clashing with the user's own tl/expected.hpp usage without them being aware of it.
The generated code template itself does not directly include tl_expected/expected.hpp. The dependency comes through rsl (via rsl/parameter_validators.hpp) and parameter_traits (via parameter_traits/parameter_traits.hpp). Since generate_parameter_library generates code that users include in their own packages, this transitively pulls in tl_expected/expected.hpp to all downstream consumers, potentially clashing with the user's own tl/expected.hpp usage without them being aware of it.
Suggestion
Consider migrating from the ROS tl_expected package to the Ubuntu system package libexpected-dev (rosdep key: libexpected-dev), at least for Jazzy and later (Ubuntu 24.04+). This would:
- Eliminate the dual-installation conflict
- Align with the system package that Ubuntu users may already have installed
- Use a newer version (1.1.0 vs 1.0.1)
This would involve changing the include path from <tl_expected/expected.hpp> to <tl/expected.hpp> in rsl, parameter_traits, and generate_parameter_library.
Environment
- ROS 2: Jazzy
- Ubuntu: 24.04 (Noble)
libexpected-dev: 1.1.0-2
ros-jazzy-tl-expected: 1.0.1
Hi, thanks for maintaining this great library!
Problem
Starting with Ubuntu 24.04 (Noble), the
libexpected-devpackage (v1.1.0) is available from the official Ubuntu repository. This package installs the header at/usr/include/tl/expected.hpp.Meanwhile,
generate_parameter_librarydepends on the ROStl_expectedpackage, which installs the same library at a different path:<prefix>/include/tl_expected/expected.hpp.Both headers are from the same upstream project (TartanLlama/expected) but at different versions:
libexpected-dev(Ubuntu 24.04)tl/expected.hppros-jazzy-tl-expected(ROS)tl_expected/expected.hppBoth headers use the same header guard (
TL_EXPECTED_HPP) and the same namespace (tl), so whichever is included first silently suppresses the other. This can cause subtle version mismatch issues and confuses tools like IWYU (include-what-you-use) about which path is canonical.Sincegenerate_parameter_librarygenerates code that users include in their own packages, this issue affects all downstream consumers — not just this library itself. Any package using a generated parameter library will transitively pull intl_expected/expected.hppviarsl/parameter_validators.hppandparameter_traits/parameter_traits.hpp, potentially clashing with the user's owntl/expected.hppusage without them being aware of it.The generated code template itself does not directly include
tl_expected/expected.hpp. The dependency comes throughrsl(viarsl/parameter_validators.hpp) andparameter_traits(viaparameter_traits/parameter_traits.hpp). Sincegenerate_parameter_librarygenerates code that users include in their own packages, this transitively pulls intl_expected/expected.hppto all downstream consumers, potentially clashing with the user's owntl/expected.hppusage without them being aware of it.Suggestion
Consider migrating from the ROS
tl_expectedpackage to the Ubuntu system packagelibexpected-dev(rosdep key:libexpected-dev), at least for Jazzy and later (Ubuntu 24.04+). This would:This would involve changing the include path from
<tl_expected/expected.hpp>to<tl/expected.hpp>inrsl,parameter_traits, andgenerate_parameter_library.Environment
libexpected-dev: 1.1.0-2ros-jazzy-tl-expected: 1.0.1