-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix ament_black for new get_sources API #13
Conversation
I would suggest we try and fix this in a way that works with both old and new black versions. Either using try/except or explicitly checking the Black version. ROS Humble still has a 3 more years of support left and is likely going to be stuck with the old Black version the entire time. |
This seems very hacky to me... I think if we release different versions for humble then this should work without any try/execpt. Or do I miss something? |
Sure you could, but then you have to maintain two versions and push any fixes or updates to both versions. It is pretty standard to have compatibility layers so you can support a range of library versions. Over a decade ago I contributed to Matplotlib's Qt compatibility layer and they are still using the same strategy to this day: https://github.com/matplotlib/matplotlib/blob/v3.9.0/lib/matplotlib/backends/qt_compat.py . I am assuming we want to support at least the current 'Tier 1' platforms here: https://www.ros.org/reps/rep-2000.html i.e. Windows + range of Ubuntu versions. It feels like to much effort to support them all if you have to manage different releases. Being flexible on the dependency also means the Tier 2-3 platforms are more likely to work with the package, to say nothing of anyone doing something more complex with custom builds. For my particular use case I would want the Humble release to be able to support newer Black versions. We have a company wide code quality policy that requires newer Black versions. Our build is currently using an older version of this package to avoid the compatibility issue that was recently introduced. |
Would be great to get this fix in. Currently ament_black is broken in Jazzy :-( |
I'm sorry, everyone; I'm not ignoring the messages you sent. I don't have enough time to go through the release-pain. I'm also a bit demotivated as ROS folks won't change their mind about sticking to a horrible format standard like flake8. See ros-navigation/navigation2#3941 (comment) This means that @ruffsl, would you like to take over? Can you spare some time? |
I made the fix backward compatible for black versions <23.9.0 so now it shouldn't break support for black version distributed in Ubuntu Jammy.
I can offer my help. I have some experience (~150 PRs in rosdistro) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjsowa Thanks for this!
This is why I hate this bloom so much, I always follow the instructions in https://docs.ros.org/en/jazzy/How-To-Guides/Releasing/Subsequent-Releases.html, I always need to hack things around, and now I get this error
@bjsowa any idea what could have go wrong? seems related to https://robotics.stackexchange.com/questions/60540/bloom-release-failure |
You've set your release tag to To fix that, run |
@bjsowa amazing ❤️ !!! thanks for the fast support! I was dying! |
This is my attempt to fix #12. Not sure if it is the correct way but it seems to work. Though, it will break support for black pre 23.9.0 version. Maybe we can do a version check. Any suggestions?