fix: make bt4_picknik tools and vendored lexy disjoint from stock - #27
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesCMake updates
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CMakeLists.txt`:
- Around line 95-104: Preserve the caller’s configure-wide LEXY_ENABLE_INSTALL
cache state around add_subdirectory(3rdparty/lexy): capture whether the cache
entry existed and its original value before the forced OFF assignment, then
restore that value afterward or unset the cache variable when it was previously
absent. Keep lexy installation disabled only while adding the vendored lexy
instance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ef6970e1-51dc-4662-b905-e877fb3f73e2
📒 Files selected for processing (2)
CMakeLists.txttools/CMakeLists.txt
griswaldbrooks
force-pushed
the
disjoint-fork-packaging-20928
branch
from
July 31, 2026 17:46
a175461 to
408bc8c
Compare
Issue #20928's rename gave the library, headers, and CMake config distinct names from stock upstream behaviortree_cpp, but two file sets were still shared or shareable: - bin/bt4_plugin_manifest (and bin/bt4_recorder, gated on ZMQ_FOUND) used stock's unscoped tool names, causing a real dpkg install conflict once both packages are installed in the same image. Renamed to bt4_picknik_plugin_manifest / bt4_picknik_recorder. - Vendored lexy installed its own headers, CMake config, and static lib unscoped. lexy is linked PRIVATE/BUILD_INTERFACE-only and its only consumer (src/script_parser.cpp) is compiled into this library; no installed public header transitively requires it. Disabled lexy's own LEXY_ENABLE_INSTALL option instead of reproducing its install rules under a scoped path. 208/208 -> 207/207 tests pass (test count unchanged by these edits; target renames and an unrelated 3rdparty subproject's install option cannot affect gtest discovery). Verified empirically: built the deb the same way apt_build_farm does (bloom-generate rosdebian + fakeroot debian/rules binary) and compared dpkg-deb -c file lists against the pinned stock snapshot (ros-jazzy-behaviortree-cpp 4.9.0-1noble.20260412) - the regular-file intersection is exactly zero (directory entries are excluded from that count; dpkg always allows multiple packages to jointly own a directory).
griswaldbrooks
force-pushed
the
disjoint-fork-packaging-20928
branch
from
July 31, 2026 17:54
408bc8c to
b8d70d6
Compare
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.
[written by AI]
Motivation
Closes the remaining gap in issue #20928. #26 gave the fork's library, headers, and CMake config distinct names from stock upstream
behaviortree_cpp(used by nav2 in the same image), but two file sets were still shared or shareable between the two packages:bin/bt4_plugin_manifest(andbin/bt4_recorder, gated onZMQ_FOUND) used stock's unscoped tool names. Verified live: installing this fork's deb followed by stock's deb hits a real dpkg fatal error —trying to overwrite '/opt/ros/jazzy/bin/bt4_plugin_manifest', which is also in package ros-jazzy-behaviortree-cpp-picknik. dpkg'spath-excludemechanism (used elsewhere in the moveit_pro image to keep stock's dev files out) does not prevent this class of conflict — it only suppresses extraction for files that aren't already claimed by another installed package; the overwrite check runs regardless. Proven with a minimal synthetic two-package dpkg test before touching this repo.include/lexy/,include/lexy_ext/,lib/<arch>/cmake/lexy/,lib/<arch>/liblexy_file.a). The currently pinned stock snapshot doesn't vendor lexy, but a future one plausibly could, recreating the same collision class.Renaming/excluding at the source (this repo) is more robust than trying to path-exclude around a collision after the fact, since exclude-based mitigation is proven insufficient for genuinely double-owned files.
Changes
tools/CMakeLists.txt: renamedbt4_plugin_manifest→bt4_picknik_plugin_manifest,bt4_recorder→bt4_picknik_recorder. No other file in the repo references the old names (confirmed via full-repo grep before renaming).CMakeLists.txt: setLEXY_ENABLE_INSTALL OFFbeforeadd_subdirectory(3rdparty/lexy), using lexy's own existing install-guard option rather than hand-patching eachinstall()call in its CMakeLists. Verified safe to drop: lexy is linkedPRIVATE/BUILD_INTERFACE-only, and its only consumer,src/script_parser.cpp, is compiled into this library itself. No installed public header transitively includes lexy — only the internalscripting/operators.hpp→scripting/any_types.hppchain does, and neitherbehavior_tree.h,bt_factory.h, norbasic_types.hreaches that chain (confirmed by grep).Tests
207/207 pass (ament build,
behaviortree_cpp_picknik_test, zero failures). Test count is unaffected by these edits by construction — renaming CMake executable targets and toggling an unrelated 3rdparty subproject's install option cannot change which gtest cases are discovered fromtests/CMakeLists.txt.Empirical disjointness proof (acceptance criterion)
Built this branch's deb the same way apt_build_farm does —
bloom-generate rosdebian --ros-distro jazzy --debian-inc 1thenfakeroot debian/rules binary— and compared itsdpkg-deb -cfile list against the pinned stock snapshot (ros-jazzy-behaviortree-cpp4.9.0-1noble.20260412.042652, the exact package apt_build_farm's build environment resolves today).Fork's
bin/now contains onlybt4_picknik_plugin_manifest(bt4_picknik_recorderdoesn't build in this ament configuration — pre-existing, unrelated:tools/CMakeLists.txtchecksZMQ_FOUND, butcmake/FindZeroMQ.cmakesetsZeroMQ_FOUND, so theif(ZMQ_FOUND)guard has never been true here). Fork'sinclude/andlib/ship zero lexy paths. Stock's file list is unchanged from before this PR.Release notes
N/A — this repo doesn't use moveit_pro's release-note convention.
Agent review
This repo has no
## Claude agent checkstemplate, so recording results here instead of a checklist. Reviewers ran sequentially permoveit_pro's.claude/rules/agent-delegation.md(code-revieweralways;platform-architect-botadded for packaging/CMake scope;security-auditorgated on findings).code-reviewer: 1 P2 — theLEXY_ENABLE_INSTALLCACHE BOOLhelp-string was empty (""), giving no context to anyone inspectingcmake-gui/ccmake. Applied: help-string now reads"Disabled by behaviortree_cpp_picknik, see comment above".platform-architect-bot: no P0/P1. Empirically verified theCACHE ... FORCEidiom is load-bearing, not just sufficient — a plainset(LEXY_ENABLE_INSTALL OFF)gets silently overridden by lexy's ownoption(LEXY_ENABLE_INSTALL ...)because3rdparty/lexy/CMakeLists.txt'scmake_minimum_required(VERSION 3.8)puts CMP0077 in OLD behavior; confirmed by a counterfactual build. Also verified the$<BUILD_INTERFACE:>/$<INSTALL_INTERFACE:>split correctly keeps lexy out of this library's exportedINTERFACE_LINK_LIBRARIES. 4 P2s:CMakeLists.txt:97-99was self-contradictory — it claimed "No installed public header transitively includes it" while its own parenthetical namedscripting/operators.hpp/any_types.hpp, which are installed. Applied: reworded to "No header reachable from the public entry points … includes lexy; the … chain does, but it is parser-internal."tools/CMakeLists.txt'sbt4_picknik_recorderrename is currently unreachable/unexercised by any build in this repo, since the guard checksZMQ_FOUND(never set — onlycmake/FindZeroMQ.cmake'sZeroMQ_FOUNDis) — a pre-existing, unrelated bug. Deferred: out of scope for this PR (already called out in the disjointness-proof section above); fixing theZMQ_FOUND/ZeroMQ_FOUNDmismatch is a separate change.cmake/conan_build.cmake:18setsBTCPP_INCLUDE_DESTINATIONto bareinclude(unscoped), unlikeament_build.cmake:31'sinclude/${PROJECT_NAME}— so the conan build path would install headers toinclude/behaviortree_cpp/**, colliding wholesale with stock. Deferred: moveit_pro only ever builds this fork via the ament path (confirmed disjoint, proof above); the conan path is pre-existing and out of scope for a packaging-disjointness PR scoped to what moveit_pro actually ships.scripting/operators.hpp/any_types.hppfrom the installed headers glob, since they're lexy-only and parser-internal. Deferred: the bot's own framing was "arguably its own PR" — it would change the installed file set (requiring the disjointness proof to be re-run) for a header-hygiene improvement unrelated to this PR's actual collision fix.security-auditor: not run. No finding fromcode-reviewerorplatform-architect-botwas security-flavored (all were comment accuracy, CMake variable scoping, and unreachable-build-path observations); nothing in this PR's diff touches parsing untrusted input, credentials, or network-facing code.Tests re-confirmed green after the P2 fixes:
cmake --configuresucceeds cleanly (verified in-container); both applied changes are comment/help-string text only, touching noinstall()rule or target name, so the file set — and therefore the empirical disjointness proof above — is unchanged and was not re-run.CodeRabbit review
CMakeLists.txt:95-104(Minor):LEXY_ENABLE_INSTALL OFF CACHE ... FORCEis configure-wide; if this project is embedded viaadd_subdirectory()alongside another, unrelated lexy instance, the forcedOFFwould silently suppress that instance's install rules too. Applied (b8d70d6e): save the caller's prior cache state (absent, or its previous value) before forcingOFF, restore it immediately afteradd_subdirectory(3rdparty/lexy)returns — safe because lexy's ownoption(LEXY_ENABLE_INSTALL ...)has already read the forced value by then (the same CMP0077-OLD mechanism platform-architect-bot verified makesCACHE FORCEnecessary in the first place only applies to that one read). Re-verified after the fix: clean configure, 207/207 tests pass, install tree still ships zero lexy paths and onlybt4_picknik_plugin_manifestinbin/— install rules unchanged, so the empirical disjointness proof above was not re-run.