Skip to content

Update foxglove_bridge to use new ament_index API#803

Draft
ericmlujan wants to merge 1 commit intomainfrom
eric/ament-path-api
Draft

Update foxglove_bridge to use new ament_index API#803
ericmlujan wants to merge 1 commit intomainfrom
eric/ament-path-api

Conversation

@ericmlujan
Copy link
Contributor

@ericmlujan ericmlujan commented Jan 7, 2026

Changelog

Docs

Description

BeforeAfter
Fixes: FLE-165

@linear
Copy link

linear bot commented Jan 7, 2026

// Get the package share directory, or throw a PackageNotFoundError
const std::string share_dir = ament_index_cpp::get_package_share_directory(package);
std::filesystem::path share_dir;
#if AMENT_INDEX_CPP_VERSION_GTE(1, 13, 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This macro should become available after ament/ament_index#105 merges

ericmlujan added a commit that referenced this pull request Jan 8, 2026
### Changelog
None

### Docs
None

### Description
Temporarily suppress deprecation warnings for
`get_package_share_directory`, which will cause ROS2 buildfarm builds to
pass for Foxglove Bridge. These suppressions will be reverted in #803
once ament/ament_index#105 has merged and ROS packages have synced.

Fixes: FLE-165

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Temporarily mutes deprecation warnings to unblock ROS2 builds.
> 
> - Wraps `ament_index_cpp::get_package_share_directory` call in
`message_definition_cache.cpp` with GCC pragmas to ignore
`-Wdeprecated-declarations`
> - Adds TODO noting removal after `ament_index_cpp` update (FLE-167)
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
14325f4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@clalancette
Copy link
Contributor

Just as an FYI, the upstream PR merged and is available in Jazzy, Kilted, and Rolling. We are still waiting for a Humble patch release; once that happens we should be able to move forward with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants