Skip to content

Make sources self-contained without PCH and unity builds - #256

Open
luapmartin wants to merge 2 commits into
musescore:mainfrom
luapmartin:luapmartin/self-contained-includes
Open

Make sources self-contained without PCH and unity builds#256
luapmartin wants to merge 2 commits into
musescore:mainfrom
luapmartin:luapmartin/self-contained-includes

Conversation

@luapmartin

Copy link
Copy Markdown
Contributor

Follow-up to the discussion in #254: makes the framework build with MUSE_COMPILE_USE_PCH=OFF and MUSE_COMPILE_USE_UNITY=OFF — every source and header is now self-contained instead of relying on the PCH force-include or a unity batch neighbor.

Two classes of fixes:

  • Missing includes (<QLocale>, <QPainter>, <QMetaEnum>, <functional>, ...) in sources written against the PCH's implicit baseline. Includes filesystem.h (also fixed in Let the application own the MUSE_COMPILE_USE_PCH option #254 originally; consolidated here).
  • Missing Qt module links: muse_pch links Qt::Core/Gui/Quick PUBLIC, so PCH-enabled modules silently inherited those Qt modules. Modules now declare their real Qt dependencies (Qt::Quick, Qt::Network, ...), and muse_global links Qt::Qml PUBLIC since its public api/iapiengine.h exposes QJSValue.

Verified by full strict builds (PCH off + unity off) on macOS (Apple clang / libc++) and Linux (gcc-14 / libstdc++, matching CI). Codestyle check passes.

Possible follow-up: a CI job building the strict configuration would keep this from regressing.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 58 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 04e3e097-673e-448f-bbdc-20f0e3e260a1

📥 Commits

Reviewing files that changed from the base of the PR and between be3bd19 and 4b2354a.

📒 Files selected for processing (28)
  • framework/audio/engine/internal/iexecoperation.h
  • framework/cloud/internal/abstractcloudservice.cpp
  • framework/cloud/musescorecom/musescorecomservice.cpp
  • framework/extensions/qml/Muse/Extensions/CMakeLists.txt
  • framework/global/CMakeLists.txt
  • framework/global/api/apiutils.h
  • framework/global/io/internal/filesystem.h
  • framework/interactive/api/interactiveapi.cpp
  • framework/interactive/internal/iinteractiveprovider.h
  • framework/interactive/internal/interactive.cpp
  • framework/interactive/qml/Muse/Interactive/interactiveprovidermodel.h
  • framework/multiwindows/CMakeLists.txt
  • framework/multiwindows/internal/singleprocess/singleprocessprovider.cpp
  • framework/multiwindows/qml/Muse/MultiWindows/multiinstancesdevmodel.cpp
  • framework/multiwindows/qml/Muse/MultiWindows/multiinstancesdevmodel.h
  • framework/rcontrol/CMakeLists.txt
  • framework/tours/CMakeLists.txt
  • framework/tours/qml/Muse/Tours/CMakeLists.txt
  • framework/ui/api/themeapi.cpp
  • framework/ui/qml/Muse/Ui/initialletternavigation.cpp
  • framework/ui/qml/Muse/Ui/initialletternavigation.h
  • framework/ui/view/qmldataformatter.cpp
  • framework/ui/view/widgetstyle.cpp
  • framework/uicomponents/qml/Muse/UiComponents/CMakeLists.txt
  • framework/uicomponents/qml/Muse/UiComponents/abstracttableviewmodel.cpp
  • framework/uicomponents/qml/Muse/UiComponents/filteredflyoutmodel.h
  • framework/uicomponents/qml/Muse/UiComponents/polylineplot.cpp
  • framework/update/CMakeLists.txt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant