Skip to content

Backport non-breaking changes from main for Humble and Jazzy to branch v0.9 - #72

Open
nbbrooks wants to merge 11 commits into
v0.9from
nbbrooks/v0.9-backports
Open

Backport non-breaking changes from main for Humble and Jazzy to branch v0.9#72
nbbrooks wants to merge 11 commits into
v0.9from
nbbrooks/v0.9-backports

Conversation

@nbbrooks

@nbbrooks nbbrooks commented Aug 3, 2026

Copy link
Copy Markdown
Member

Why

Humble and Jazzy have been stranded on 0.9.3 / 0.9.4 since early 2024 while Kilted, Lyrical and Rolling moved to 1.0.3. See #69.

main itself builds and tests clean on both. However, 1.0.0 removed public API (TypeDefinition<T>, getLockedReference()/LockedRef, details/mutex.hpp) and changed ABI. Shipping it to a released distro would break violate semantic versioning contracts. Users can source build main to opt-in to breaking changes.

The v0.9 branch takes only the additive and bug-fix subset of the 75 commits since 0.9.4, to be released as 0.9.5 — a legitimate patch bump on both distros.

Included

PR Commits Gives Humble + Jazzy How it went in
#40 dd73810 Fixes UB in SerializeIntoBuffer — write through reinterpret_cast<T*> into the byte buffer ⚠️ Partial. Only the std::memcpy hunk. The rest is clang-format churn against post-1.0.0 has_TypeDefinition SFINAE overloads that don't exist here.
#60 561dcf4 inline on TypeField::operator== — fixes multiple-definition link failure Clean cherry-pick
#62 3bb5e80 MCAPSink::finishQueueAndStop() + 3 protected DataSinkBase queue hooks Two conflicts. The dt_tests.cpp hunk dragged in an unrelated LockedPtr test using 1.0.x-only API — dropped, kept only FinishQueue. See the restartRecording note below.
#65 c010851 14474eb de6319f 0acbf45 a355a4d 8254589 LogChannel::removeDataSink(), getNumberOfSinks(), sinks_mutex locking, logging_started race fix, new add_remove_sink_tests.cpp Conflicts were pure clang-format drift (if ( vs if(). Took upstream semantics, kept this branch's spacing. All six needed8254589 fixes a race c010851 introduces.
#58 eb17fee CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS Clean. Verified to apply and not regress Linux; the Windows fix itself is untested here, same as on main.

Plus two commits authored for this branch, not cherry-picks — please don't try to match them against main:

  • tests: drop unused id_value in FinishQueue test — this branch applies -Werror globally via add_compile_options, so it covers tests. main scoped it to target_compile_options(data_tamer PRIVATE ...), which is why the unused variable in 3bb5e80 never tripped upstream.
  • fix: missing return in LockedRef move-assignmentLockedRef& operator=(LockedRef&&) declares a reference return type and falls off the end. Any consumer that move-assigns one gets -Werror=return-type, or UB without -Werror. Latent in-tree only because nothing instantiates it. This is the counterpart of Fix compile error #23 (see below).

Excluded

PR Reason
13e10a9 "Merge branch 'new_custom'" (no PR) Breaking. Removes TypeDefinition<T> struct API and getLockedReference()/LockedRef. This is the change that stranded these distros.
#27 Breaking. Deletes public header details/mutex.hpp, redefines Mutex as std::shared_mutex.
#24 Tests/docs/example for the post-#27 locked-ptr API. Won't compile here.
#47 ABI break (BasicType : uint8_t). Also flips BuilSchemaFromText to check_hash = false, silently weakening validation this branch currently enforces.
#40 (rest) 49b4c6c, f2dcee6 are built on the post-1.0.0 has_TypeDefinition SFINAE. Only the UB hunk extracts.
#57 README documenting the new TypeDefinition API — actively wrong on 0.9.x.
#68 ABI break — moves the constructor inline into a template. Source-compatible and it does compile on Humble, but it breaks ABI for anyone linked against the existing debs, and supersedes #17. 134 of its 190 lines are tests, which could be lifted separately if wanted.
#23 Not applicable. Patches LockedPtr::operator=, a class that only exists after the LockedRefLockedPtr rewrite in #27 — the same rewrite that introduced #23's bug. Equivalent fix authored directly instead (above).
#37 Excluded by choice. See the restartRecording note below.
#17 #32 #36 #54 #64 Additive but out of scope for a patch release; #36 and #54 change build semantics.
#67 Not merged upstream yet.
#28 #30 #38 #49 #50 #51 #52 #53 #55 CI and release plumbing for the 1.0.x line — irrelevant to this branch, which needs its own Humble+Jazzy workflow.

One resolution worth a careful look

3bb5e80 adds a startAcceptingSnapshots() call to restartRecordingImpl(), which doesn't exist at 0.9.4 — it arrived with #37. Git auto-resolved this into the tail of restartRecording(), which is the semantically right place, but it was fuzzy auto-resolution rather than an authored decision.

If #37 is ever backported, this must be revisited or the call lands in the wrong function.

Verification

Built and tested in osrf/ros:humble-desktop and osrf/ros:jazzy-desktop:

  • 23/23 tests pass on both, including the new DataTamerBasic.FinishQueue and the add_remove_sink_tests.cpp suite
  • A standalone TU that move-assigns a LockedRef fails to compile before the fix and compiles after, on both distros

Net diff vs 0.9.4: +219 / −12 across 14 files. No public API removed.

nbbrooks and others added 11 commits August 2, 2026 19:33
Backport of the functional part of upstream dd73810. Writing through
reinterpret_cast<T*> to the byte buffer is UB (type-punning / possible
misalignment); use std::memcpy instead.

Only the memcpy hunk is taken. The rest of dd73810 is clang-format churn
against the post-1.0.0 has_TypeDefinition SFINAE overloads, which do not
exist on this branch.

(cherry picked from commit dd73810f1e42a4b60d2c62a4e56ffbaa8e7b1e10, partial)
Co-authored-by: jlack <jlack@nauticusrobotics.com>
(cherry picked from commit 561dcf4)
(cherry picked from commit 3bb5e80)
(cherry picked from commit ca2724e06d2d07abd8dbc0b517d9b7ea930ba3d7)
The 0.9.x branch applies -Werror globally via add_compile_options, so the
unused variable carried over from upstream 3bb5e80 fails the test build.
On main the flags are scoped to the data_tamer target only, which is why
this never tripped there.

(cherry picked from commit cadbc8f391c91ea9dc9e65159a95baeb9e832f0a)
…S_EXPORT_ALL_SYMBOLS (#58)

(cherry picked from commit eb17fee)
LockedRef& operator=(LockedRef&&) declares a reference return type but
falls off the end of the function. Any consumer that move-assigns a
LockedRef gets 'error: no return statement in function returning
non-void [-Werror=return-type]', or UB if the result is used without
-Werror.

This is the 0.9.x counterpart of upstream #23 (7365642), which cannot be
cherry-picked: it patches LockedPtr::operator=, a class that only exists
after the LockedRef -> LockedPtr rewrite in #27. The upstream bug (a
stray '&' on mutex_) was introduced by that rewrite; the bug on this
branch is different and more severe.
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.

5 participants