Skip to content

Suppress deprecation warning for ament_index API#804

Merged
ericmlujan merged 1 commit intomainfrom
eric/suppress-ament-warning
Jan 8, 2026
Merged

Suppress deprecation warning for ament_index API#804
ericmlujan merged 1 commit intomainfrom
eric/suppress-ament-warning

Conversation

@ericmlujan
Copy link
Contributor

@ericmlujan ericmlujan commented 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


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)

Written by Cursor Bugbot for commit 14325f4. This will update automatically on new commits. Configure here.

@ericmlujan ericmlujan requested a review from clalancette January 8, 2026 18:10
@linear
Copy link

linear bot commented Jan 8, 2026

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@ericmlujan ericmlujan merged commit 20e56b1 into main Jan 8, 2026
48 checks passed
@ericmlujan ericmlujan deleted the eric/suppress-ament-warning branch January 8, 2026 21:10
ericmlujan added a commit that referenced this pull request Jan 9, 2026
### Changelog
None

### Docs
None

### Description
See #804 for general description of the issue. Missed another API that
was deprecated. This should make the build pass now, verified by
enabling the ros2-testing repo in an ubuntu VM and building
successfully.

Fixes: FLE-165

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Silences deprecated API warnings in `message_definition_cache.cpp` for
compatibility across ROS2 distros.
> 
> - Wraps `ament_index_cpp::get_resource("rosidl_interfaces", ...)` with
`#pragma GCC diagnostic push/ignored("-Wdeprecated-declarations")`
(mirroring existing handling for `get_package_share_directory`)
> - No functional logic changes; build noise reduced
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7aba2b6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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