Deprecate AllocatorMemoryStrategy, MemoryStrategy and remove related test cases#3082
Open
Scott-Duncan wants to merge 3 commits intoros2:rollingfrom
Open
Conversation
Mark AllocatorMemoryStrategy as deprecated, as they have become dead code following the double-buffering changes in the executor. - Add [[deprecated]] attributes to classes and methods. - Add macros to silence test warnings Signed-off-by: Scott Duncan <scott.duncan.work@gmail.com>
Mark MemoryStrategy as deprecated, as they have become dead code following the double-buffering changes in the executor. - Add [[deprecated]] attributes to classes and methods. - Deprecate memory_strategy member in ExecutorOptions. - Add macros to silence warning with tests Signed-off-by: Scott Duncan <scott.duncan.work@gmail.com>
Remove test_memory_strategy.cpp and test_allocator_memory_strategy.cpp and update CMakeLists.txt. These tests are no longer required as the target classes are deprecated and slated for removal. Signed-off-by: Scott Duncan <scott.duncan.work@gmail.com>
eef8a81 to
faf005f
Compare
jmachowinski
requested changes
Feb 23, 2026
Collaborator
jmachowinski
left a comment
There was a problem hiding this comment.
Only adding deprecation to the classes is enough.
The test must stay in place over the deprecation period, but should use
RCPPUTILS_DEPRECATION_WARNING_OFF_START
//test code with deprecation in it
RCPPUTILS_DEPRECATION_WARNING_OFF_STOP
to supress the compile warnings
Comment on lines
+48
to
+54
| #if !defined(_WIN32) | ||
| #pragma GCC diagnostic push | ||
| #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
| #else // !defined(_WIN32) | ||
| #pragma warning(push) | ||
| #pragma warning(disable : 4996) | ||
| #endif |
Collaborator
There was a problem hiding this comment.
This is removing the deprecation warning, which defies the purpose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the deprecation of AllocatorMemoryStrategy and the MemoryStrategy base class as discussed in #3049. All classes and methods are marked deprecated, the relevant tests
test_allocator_memory_strategy.cpp,test_memory_strategy.cpphave been deleted and removed from the TestingCMakeLists.txt.Fixes: #3049
Is this user-facing behavior change?
No.
Did you use Generative AI?
No.
Additional Information
Tested and compiled using the ros:rolling Docker image