Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some changes for newer versions of uncrustify #1591

Closed
wants to merge 5 commits into from

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Mar 19, 2024

Follow up of this PR #1578

I can see some failures here https://build.ros2.org/job/Rpr__rosbag2__ubuntu_noble_amd64/14/

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
@ahcorde ahcorde self-assigned this Mar 19, 2024
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
@MichaelOrlov
Copy link
Contributor

@ahcorde A general comment instead of guarding a lot of code segments with the

// *INDENT-OFF*
...
// *INDENT-ON*

statements it will be preferable to reformat everything with the new version of the Uncrustify.

cc: @clalancette It seems a nightmare with the new version of Uncrustify escalades more severely and more quickly than we assumed. The code formatting is going to diverge more significantly from previous ROS 2 distros and it will be an extra burden during backporting.
It seems the idea for switching to the clang-format for core packages is not so bad. However, it seems nobody has time for this effort currently.

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

i know this is still draft, but AFAIS those fix the uncrustify warnings. @MichaelOrlov 's comment needs to be discussed... 👓

@clalancette
Copy link
Contributor

So we still need to land ament/ament_lint#475, which smooths over at least some of these differences. I need to get back to that one, hopefully tomorrow.

@MichaelOrlov
Copy link
Contributor

@clalancette Thanks for the update. In this case I would hold off from moving forward with this PR development.

@clalancette
Copy link
Contributor

OK, so I ended up merging in ament/ament_lint#475 today. With that in place, as far as I can tell there are no uncrustify errors here. @ahcorde Can you confirm that, and if that is the case for you, close this PR? Thanks.

@ahcorde
Copy link
Contributor Author

ahcorde commented Mar 22, 2024

@clalancette I runned again the CI but I can still see some linter issues https://build.ros2.org/job/Rpr__rosbag2__ubuntu_noble_amd64/44/

@clalancette
Copy link
Contributor

@clalancette I runned again the CI but I can still see some linter issues https://build.ros2.org/job/Rpr__rosbag2__ubuntu_noble_amd64/44/

So the Rpr job is going to show the problem until we do a release of ament_lint into Rolling; I hope to do that early next week.

Can you test locally?

@MichaelOrlov
Copy link
Contributor

@ahcorde According to the other job failures, it seems we have discrepancy only in two files for now. In the rosbag2_transport/logging.hpp and rosbag2_transport/test_record.cpp.

 >>>
2024-04-09T17:12:44.2346707Z build/rosbag2_transport/test_results/rosbag2_transport/uncrustify.xunit.xml: 57 tests, 0 errors, 2 failures, 0 skipped
2024-04-09T17:12:44.2347526Z - rosbag2_transport.uncrustify src/rosbag2_transport/logging.hpp
2024-04-09T17:12:44.2347947Z   <<< failure message
2024-04-09T17:12:44.2348194Z     Diff with 30 lines
2024-04-09T17:12:44.2348436Z   >>>
2024-04-09T17:12:44.2348815Z - rosbag2_transport.uncrustify test/rosbag2_transport/test_record.cpp
2024-04-09T17:12:44.2349248Z   <<< failure message
2024-04-09T17:12:44.2349567Z     Diff with 16 lines
2024-04-09T17:12:44.2349799Z   >>>
2024-04-09T17:12:44.2349917Z 

However, need to make a fresh run on Rolling for sure.

@clalancette
Copy link
Contributor

@ahcorde According to the other job failures, it seems we have discrepancy only in two files for now. In the rosbag2_transport/logging.hpp and rosbag2_transport/test_record.cpp.

Hm, that shouldn't be anymore. I believe that at the moment, we should be uncrustify clean. I'm running a job right now on Noble to check.

@MichaelOrlov
Copy link
Contributor

  • I've tried to reproduce on the latest Rolling build locally and my uncrustify is happy.
    The errors reported before
2024-04-09T17:12:44.2346707Z build/rosbag2_transport/test_results/rosbag2_transport/uncrustify.xunit.xml: 57 tests, 0 errors, 2 failures, 0 skipped
2024-04-09T17:12:44.2347526Z - rosbag2_transport.uncrustify src/rosbag2_transport/logging.hpp
2024-04-09T17:12:44.2347947Z   <<< failure message
2024-04-09T17:12:44.2348194Z     Diff with 30 lines
2024-04-09T17:12:44.2348436Z   >>>
2024-04-09T17:12:44.2348815Z - rosbag2_transport.uncrustify test/rosbag2_transport/test_record.cpp
2024-04-09T17:12:44.2349248Z   <<< failure message
2024-04-09T17:12:44.2349567Z     Diff with 16 lines
2024-04-09T17:12:44.2349799Z   >>>
2024-04-09T17:12:44.2349917Z 

was on the old branches before #1578

  • Closing this PR as will not be merged since all uncrustify issues has already been addressed.

@MichaelOrlov MichaelOrlov deleted the ahcorde/rolling/uncrustify_fixes branch July 13, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants