Skip to content

Conversation

@AlanGriffiths
Copy link
Contributor

@AlanGriffiths AlanGriffiths commented Jan 6, 2026

More tidy up of mircommon structure:

  • Removed the separate libmircommon-internal-dev package, merging it into libmircommon-dev
  • Refactored CMake build to use OBJECT libraries (mircommondispatch, mircommoninput) for better modularity
  • Moved internal headers (e.g., event_private.h, signal_blocker.h) from public includes to source-local includes

@AlanGriffiths AlanGriffiths requested a review from a team as a code owner January 6, 2026 15:00
@tarek-y-ismail
Copy link
Contributor

CI isn't happy, I suspect it's these lines since src/include/common/mir doesn't exist anymore.

install(
DIRECTORY ${CMAKE_SOURCE_DIR}/src/include/common/mir
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mircommon-internal"
)

@AlanGriffiths AlanGriffiths requested a review from Copilot January 6, 2026 16:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the mircommon component by consolidating internal development headers into the main libmircommon-dev package and reorganizing the build system to use modular OBJECT libraries instead of a monolithic source list approach.

Key changes:

  • Removed the separate libmircommon-internal-dev package, merging it into libmircommon-dev
  • Refactored CMake build to use OBJECT libraries (mircommondispatch, mircommoninput) for better modularity
  • Moved internal headers (e.g., event_private.h, signal_blocker.h) from public includes to source-local includes

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/common/thread/CMakeLists.txt Removed signal_blocker.cpp from mirsharedthread (moved to dispatch)
src/common/mircommon-internal.pc.in Deleted obsolete pkg-config file for removed internal package
src/common/input/xkb_mapper.cpp Updated include path for event_private.h to relative path
src/common/input/input_event.cpp Updated include path for event_private.h to relative path
src/common/input/CMakeLists.txt Created new mircommoninput OBJECT library
src/common/events/event_builders.cpp Updated include path for event_private.h to relative path
src/common/event_printer.cpp Updated include path for event_private.h to relative path
src/common/event.cpp Updated include path for event_private.h to relative path
src/common/dispatch/threaded_dispatcher.cpp Updated include path for signal_blocker.h to relative path
src/common/dispatch/signal_blocker.cpp Updated include path for signal_blocker.h to relative path
src/common/dispatch/CMakeLists.txt Created mircommondispatch OBJECT library and moved signal_blocker.cpp here
src/common/CMakeLists.txt Refactored to link OBJECT libraries instead of accumulating source lists
debian/libmircommon-internal-dev.install Deleted install manifest for removed package
debian/control Converted libmircommon-internal-dev to transitional package

@AlanGriffiths
Copy link
Contributor Author

Hmm there seems to be a problem with installing libglib2.0-0t64 when crossbuilding...

On armhf

The following packages have unmet dependencies:
 python3-gi : Depends: gir1.2-glib-2.0 (>= 1.64.0) but it is not installable
 libwacom9:armhf : Depends: libglib2.0-0t64:armhf (>= 2.68.0) but it is not installable
 libglib2.0-dev:armhf : Depends: libglib2.0-0t64:armhf (= 2.80.0-6ubuntu3.6) but it is not installable
                        Depends: libglib2.0-bin:armhf (= 2.80.0-6ubuntu3.6)
                        Depends: libglib2.0-dev-bin:armhf (= 2.80.0-6ubuntu3.6)
                        Depends: libglib2.0-dev-bin-linux:armhf (= 2.80.0-6ubuntu3.6)
                        Depends: libgirepository-2.0-0:armhf (= 2.80.0-6ubuntu3.6) but it is not going to be installed
 umockdev:armhf : Depends: libglib2.0-0t64:armhf (>= 2.64.0) but it is not installable
 libglibmm-2.4-1t64:armhf : Depends: libglib2.0-0t64:armhf (>= 2.62.0) but it is not installable
 gir1.2-glib-2.0:armhf : Depends: libglib2.0-0t64:armhf (= 2.80.0-6ubuntu3.6) but it is not installable
 libgudev-1.0-0:armhf : Depends: libglib2.0-0t64:armhf (>= 2.79.0) but it is not installable
 gir1.2-girepository-2.0 : Depends: gir1.2-gobject-2.0 (>= 2.80.0)
 libumockdev0:armhf : Depends: libglib2.0-0t64:armhf (>= 2.44.0) but it is not installable
 python3-dbusmock : Depends: gir1.2-glib-2.0 but it is not installable

On arm64

2026-01-06T17:13:31.1253716Z The following packages have unmet dependencies:
2026-01-06T17:13:31.1253890Z  python3-gi : Depends: gir1.2-glib-2.0 (>= 1.64.0) but it is not installable
2026-01-06T17:13:31.1254100Z  libwacom9:arm64 : Depends: libglib2.0-0t64:arm64 (>= 2.68.0) but it is not installable
2026-01-06T17:13:31.1254347Z  libglib2.0-dev:arm64 : Depends: libglib2.0-0t64:arm64 (= 2.80.0-6ubuntu3.6) but it is not installable
2026-01-06T17:13:31.1254464Z                         Depends: libglib2.0-bin:arm64 (= 2.80.0-6ubuntu3.6)
2026-01-06T17:13:31.1254598Z                         Depends: libglib2.0-dev-bin:arm64 (= 2.80.0-6ubuntu3.6)
2026-01-06T17:13:31.1254745Z                         Depends: libglib2.0-dev-bin-linux:arm64 (= 2.80.0-6ubuntu3.6)
2026-01-06T17:13:31.1254979Z                         Depends: libgirepository-2.0-0:arm64 (= 2.80.0-6ubuntu3.6) but it is not going to be installed
2026-01-06T17:13:31.1255170Z  umockdev:arm64 : Depends: libglib2.0-0t64:arm64 (>= 2.64.0) but it is not installable
2026-01-06T17:13:31.1255401Z  libglibmm-2.4-1t64:arm64 : Depends: libglib2.0-0t64:arm64 (>= 2.62.0) but it is not installable
2026-01-06T17:13:31.1255633Z  gir1.2-glib-2.0:arm64 : Depends: libglib2.0-0t64:arm64 (= 2.80.0-6ubuntu3.6) but it is not installable
2026-01-06T17:13:31.1255838Z  libgudev-1.0-0:arm64 : Depends: libglib2.0-0t64:arm64 (>= 2.79.0) but it is not installable
2026-01-06T17:13:31.1255997Z  gir1.2-girepository-2.0 : Depends: gir1.2-gobject-2.0 (>= 2.80.0)
2026-01-06T17:13:31.1256509Z  libumockdev0:arm64 : Depends: libglib2.0-0t64:arm64 (>= 2.44.0) but it is not installable
2026-01-06T17:13:31.1256690Z  python3-dbusmock : Depends: gir1.2-glib-2.0 but it is not installable

... I don't think it is related

debian/control Outdated
libmircommon-internal-dev (<< 2.25)
Replaces: mircommon-dev (<< 0.6),
libmircommon-internal-dev (<< 2.25)
Provides: libmircommon-internal-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this provides line make sense? I know the intent is to get rid of the libmircommon-internal-dev package, but libmircommon-dev does not seem to provide any of the functionality of the other package (pkg-config files, headers).

Would the Breaks / Replaces be enough on their own?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following what we did (in #4475) when removing mir-renderer-gl-dev. As I said there, I'm not entirely familiar with the right way to do this.

@copilot WDYT?

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@AlanGriffiths I've opened a new pull request, #4606, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits January 7, 2026 09:50
The Provides field is not appropriate here because libmircommon-dev
doesn't actually provide the same pkg-config files (mircommon-internal.pc)
or header directory (mircommon-internal/) that libmircommon-internal-dev
used to provide. The functionality has been merged/renamed into mircommon,
not duplicated.

The Breaks and Replaces fields are sufficient for handling the package
transition, along with the transitional package that depends on
libmircommon-dev.

Co-authored-by: AlanGriffiths <9048879+AlanGriffiths@users.noreply.github.com>
Related: #4603

## What's new?

Removed `Provides: libmircommon-internal-dev` from the
`libmircommon-dev` package definition in `debian/control`.

The `Provides` field is semantically incorrect here because
`libmircommon-dev` does not provide the same files that
`libmircommon-internal-dev` installed (`mircommon-internal.pc`,
`mircommon-internal/` headers). The functionality was merged/renamed
into `mircommon`, not duplicated.

`Breaks` and `Replaces` are sufficient for the package transition, along
with the transitional package depending on `libmircommon-dev (>= 2.26)`.

## How to test

Debian package metadata change only - no functional testing required.

## Checklist

- [x] Tests added and pass
- [x] Adequate documentation added

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
RAOF
RAOF previously requested changes Jan 8, 2026
Copy link
Contributor

@RAOF RAOF left a comment

Choose a reason for hiding this comment

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

We should just remove the libmircommon-internal-dev package; it serves no purpose. (We do need to keep the Breaks/Replaces so that upgrades go cleanly)

Apart from that, looks good.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

TICS Quality Gate

✔️ Passed

mir

Coding Standards: ✔️ Passed

✔️ Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.

See the results in the TICS Viewer

The following files have been checked for this project
  • src/common/dispatch/signal_blocker.cpp
  • src/common/dispatch/threaded_dispatcher.cpp
  • src/common/event_printer.cpp
  • src/common/event.cpp
  • src/common/events/event_builders.cpp
  • src/common/input/input_event.cpp
  • src/common/input/xkb_mapper.cpp

TICS / TICS / Run TICS analysis

Copy link
Contributor

@jhenstridge jhenstridge 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!

@AlanGriffiths AlanGriffiths dismissed RAOF’s stale review January 8, 2026 12:28

Change applied

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit 7202fa1 Jan 8, 2026
61 of 65 checks passed
@AlanGriffiths AlanGriffiths deleted the cmake-tidy-mircommon branch January 8, 2026 13:03
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