Skip to content

Use <lttng/lttng.h> in lttngpy and clean up includes#222

Merged
christophebedard merged 4 commits intoros2:rollingfrom
reeceholland:lttngpy-use-lttng-header
Jan 22, 2026
Merged

Use <lttng/lttng.h> in lttngpy and clean up includes#222
christophebedard merged 4 commits intoros2:rollingfrom
reeceholland:lttngpy-use-lttng-header

Conversation

@reeceholland
Copy link
Contributor

Description

This PR updates lttngpy to use the recommended umbrella LTTng header:

#include <lttng/lttng.h>

instead of including individual LTTng headers (domain.h, event.h, lttng-error.h, etc.).

Changes:

  • Replace groups of LTTng includes in lttngpy .cpp files with <lttng/lttng.h>.
  • Clean up redundant includes in corresponding .cpp files.
  • Fix uncrustify style in snapshot.cpp so lttngpy tests pass.

No functional behavior changes are intended; this is an include/style cleanup.

Fixes #220

Is this user-facing behavior change?

Did you use Generative AI?

Additional Information

…sage

Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I just have some minor comments.

Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
@reeceholland
Copy link
Contributor Author

Updated per review: added <lttng/lttng.h> to all lttng-ctl users, fixed include ordering, and kept the formatting commit separate. Thanks!

Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

Looks good, thank you again for the PR and thank you for iterating with me! I'll trigger CI.

@christophebedard
Copy link
Member

Pulls: #222
Gist: https://gist.githubusercontent.com/christophebedard/a5ff813ad055e225f9ac8b2e7dcd298b/raw/6d81537d1e9c35b6951628b23dc65930868b3335/ros2.repos
BUILD args: --packages-above-and-dependencies lttngpy
TEST args: --packages-above lttngpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18022

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@christophebedard christophebedard merged commit 91ff616 into ros2:rolling Jan 22, 2026
9 checks passed
@christophebedard
Copy link
Member

@Mergifyio backport kilted jazzy

@mergify
Copy link

mergify bot commented Jan 22, 2026

backport kilted jazzy

✅ Backports have been created

Details

Cherry-pick of 91ff616 has failed:

On branch mergify/bp/kilted/pr-222
Your branch is up to date with 'origin/kilted'.

You are currently cherry-picking commit 91ff616.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   lttngpy/src/lttngpy/channel.cpp
	modified:   lttngpy/src/lttngpy/channel.hpp
	modified:   lttngpy/src/lttngpy/context_app.cpp
	modified:   lttngpy/src/lttngpy/context_lttng.cpp
	modified:   lttngpy/src/lttngpy/context_lttng.hpp
	modified:   lttngpy/src/lttngpy/context_perf.cpp
	modified:   lttngpy/src/lttngpy/context_perf.hpp
	modified:   lttngpy/src/lttngpy/event.cpp
	modified:   lttngpy/src/lttngpy/event.hpp
	modified:   lttngpy/src/lttngpy/session.cpp

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   lttngpy/src/lttngpy/snapshot.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 91ff616 has failed:

On branch mergify/bp/jazzy/pr-222
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit 91ff616.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   lttngpy/src/lttngpy/channel.cpp
	modified:   lttngpy/src/lttngpy/channel.hpp
	modified:   lttngpy/src/lttngpy/context_app.cpp
	modified:   lttngpy/src/lttngpy/context_lttng.cpp
	modified:   lttngpy/src/lttngpy/context_lttng.hpp
	modified:   lttngpy/src/lttngpy/context_perf.cpp
	modified:   lttngpy/src/lttngpy/context_perf.hpp
	modified:   lttngpy/src/lttngpy/event.cpp
	modified:   lttngpy/src/lttngpy/event.hpp
	modified:   lttngpy/src/lttngpy/session.cpp

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   lttngpy/src/lttngpy/snapshot.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Jan 22, 2026
Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
(cherry picked from commit 91ff616)

# Conflicts:
#	lttngpy/src/lttngpy/snapshot.cpp
mergify bot pushed a commit that referenced this pull request Jan 22, 2026
Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
(cherry picked from commit 91ff616)

# Conflicts:
#	lttngpy/src/lttngpy/snapshot.cpp
christophebedard added a commit that referenced this pull request Jan 23, 2026
…231)

Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
(cherry picked from commit 91ff616)

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
Co-authored-by: RHolland <17493785+reeceholland@users.noreply.github.com>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
christophebedard added a commit that referenced this pull request Jan 23, 2026
…232)

Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
(cherry picked from commit 91ff616)

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
Co-authored-by: RHolland <17493785+reeceholland@users.noreply.github.com>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
RaphvK pushed a commit to RaphvK/ros2_tracing that referenced this pull request Mar 2, 2026
Signed-off-by: Reece Holland <reece.j.holland@gmail.com>
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.

Switch to only including <lttng/lttng.h> in lttngpy

2 participants