Skip to content

Bundle uncrustify as prebuilt wheels and select it per ROS distribution - #1

Open
emersonknapp wants to merge 1 commit into
mainfrom
uncrustify-wheel
Open

emersonknapp wants to merge 1 commit into
mainfrom
uncrustify-wheel

Conversation

@emersonknapp

Copy link
Copy Markdown
Member

apt uncrustify on Ubuntu 22.04 is 0.72.0 while rolling and jazzy pin 0.78.1 through uncrustify_vendor, and the two disagree on real ROS 2 sources, so a PATH lookup cannot give parity with colcon test.

  • uncrustify_wheel/: scikit-build-core project that builds both 0.78.1 and 0.72.0 from pinned tarballs into one py3-none wheel per platform, statically linking libstdc++, with cibuildwheel config and tests.
  • Build uncrustify wheels workflow: cibuildwheel matrix for Linux x86_64/aarch64 and macOS x86_64/arm64, publishing to a uncrustify-bin-v release when that tag does not exist yet.
  • ros-uncrustify: uses the bundled binary by default with --uncrustify-version {0.78.1,0.72.0}; --system-uncrustify keeps the PATH behavior for other platforms.
  • Docs: design decision, README, DEVELOPING release flow, changelog, plan with the pyproject wiring procedure that waits on the first wheel release.

apt uncrustify on Ubuntu 22.04 is 0.72.0 while rolling and jazzy pin
0.78.1 through uncrustify_vendor, and the two disagree on real ROS 2
sources, so a PATH lookup cannot give parity with colcon test.

- uncrustify_wheel/: scikit-build-core project that builds both 0.78.1
  and 0.72.0 from pinned tarballs into one py3-none wheel per platform,
  statically linking libstdc++, with cibuildwheel config and tests.
- Build uncrustify wheels workflow: cibuildwheel matrix for Linux
  x86_64/aarch64 and macOS x86_64/arm64, publishing to a
  uncrustify-bin-v<version> release when that tag does not exist yet.
- ros-uncrustify: uses the bundled binary by default with
  --uncrustify-version {0.78.1,0.72.0}; --system-uncrustify keeps the
  PATH behavior for other platforms.
- Docs: design decision, README, DEVELOPING release flow, changelog,
  plan with the pyproject wiring procedure that waits on the first
  wheel release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment on lines +22 to +24
The hook therefore runs a binary from the ros-uncrustify-bin wheel by default, which ships
both 0.78.1 and 0.72.0, and --uncrustify-version picks the one that matches the distribution
being targeted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It looks like this lets the same version of ros_code_standard change the version of uncrustify at runtime. I wonder if we need this.

What if ros_code_standard controls the linter versions by pinning to an exact version of uncrustify, and future ROS distros pin to a version of ros_code_standard. We could leave old ROS distros using ament_lint, setup ros_code_standard to match the versions in Rolling, and then we branch for Lyrical we branch ros_code_standard for that ROS distro?

Comment on lines +26 to +28
--system-uncrustify opts out and uses the uncrustify on PATH, choosing the ament config from
the version that binary reports.
That is the only mode available on a platform the wheel is not built for.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Might not need this feature.

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.

2 participants