Skip to content

build: restore the frontend -Wsign-conversion ratchet on the Darwin TUs once the Qt 6.11 prefixes leave it (#2950, #2625) #2989

Closed as not planned

Description

@zackees

What

#2950's fix (PR #2979) keeps the Apple TUs out of the frontend's -Wsign-conversion
opt-in, so the macOS app lanes can build. That leaves a hole the tracker does not
own: on Darwin the frontend target now compiles sparkle, macos-arc-mm and
platform-osx with the global -Wno-sign-conversion pin, and nothing stops a new
unconverted site from landing in those units while #2625 keeps removing pins.

Location

frontend/CMakeLists.txt (the single obs-studio opt-in block):

target_compile_options(
  obs-studio
  PRIVATE "$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU>:$<$<NOT:$<PLATFORM_ID:Darwin>>:-Wsign-conversion>>"
)

ci/test_frontend_conversion_optins.py holds the target to one opt-in block, so it
accepts this shape; it does not assert the Darwin exclusion is temporary.

Class

Warning-ratchet coverage gap (no runtime defect). The Darwin-only sources are the
ones #2950 was filed for, so the group is off exactly where the reported diagnostics
were.

How it is reached

A new conversion in frontend/utility/platform-osx.mm.hpp,
frontend/utility/PluginModuleLoader_MacOS.mm.hpp or any #ifdef __APPLE__ unit
compiles clean on the Linux PR lanes and on the macOS app lane too, because the flag
is gone on Darwin. PR CI never builds the app targets, so nothing else would notice.

Why the group cannot simply come back

With -Wsign-conversion on, the macOS app target stops inside the universal Qt 6.11
deps' own headers (qversiontagging.h:80, qnamespace.h:1926,1930,1935) parsed into
the frontend.signal-posix unity group. #2978 measured three CMake-level attempts to
make those includes SYSTEM (-iframework, target property, per-source
-isystem) and none of them changed the -isystem/user-include decision the Xcode
generator makes, which is why #2950 chose the per-platform exclusion instead.

Proposed fix and evidence

Restore the group on Darwin in the same block, gated on the Qt prefixes no longer
being user includes:

  1. Make the Qt include directories SYSTEM for the obs-studio target in a way the
    Xcode generator actually honours (a wrapper target that exports them INTERFACE SYSTEM, or set_source_files_properties(... PROPERTIES COMPILE_OPTIONS "-isystem...") proven with xcodebuild -showBuildSettings/-dry-run on the
    frontend.signal-posix unity file).
  2. Drop the $<$<NOT:$<PLATFORM_ID:Darwin>>:...> guard so the block reads
    -Wsign-conversion for every compiler id again.
  3. RED/GREEN: a dispatch of scheduled.yaml on the branch must show
    Build 🧱 / macOS 🍏 (arm64), (x86_64) and Analyze 🔬 / macOS 🍏 green with
    the guard removed; the pre-fix tree fails in the Qt headers, which is the RED
    evidence and is already recorded on build: master's macOS lanes are red in frontend/utility/platform-osx.mm.hpp and shared/properties-view/properties-view.cpp.hpp (#2625, #2872) #2950.
  4. Extend ci/test_frontend_conversion_optins.py with an assertion that the Darwin
    guard is absent, so this cannot silently regress either way.

If step 1 turns out to be impossible under Xcode, the alternative is to keep the
exclusion and add the three Darwin sources to a separate target that opts into the
group, so the rest of the frontend keeps the check on macOS.

Filed as the follow-up to #2950 / #2979; part of #2625.

Activity

  1. added
    infraBuild, gate, CI and tooling
    readyMeets the definition of Ready; claimable
    P3Low priority
    on Oct 30, 2026
  2. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Status from a worker tick: step 1 of the proposed fix is already closed by measurement, so this needs a scoping decision before another macOS dispatch is spent on it.

    Step 1 cannot be done from CMake under the Xcode generator

    #2978 measured three shapes against this exact target:

    • target_compile_options(... -isystem ...) — Xcode folds include-shaped options into HEADER_SEARCH_PATHS and the system-ness is lost.
    • A generator expression in XCODE_ATTRIBUTE_OTHER_CFLAGS arrives in clang's argv as a literal $<1:-iframework...> token, which clang reads as a missing input file.
    • -iframework does reach the command line and still loses: this Qt is a framework build (.deps/obs-deps-qt6-*/lib/QtCore.framework/Headers/qnamespace.h) and framework lookup is first-match, with Xcode emitting FRAMEWORK_SEARCH_PATHS before OTHER_CFLAGS. Outside the repo: clang++ -iframework lib is clean, clang++ -F lib -iframework lib warns.

    So -Wsign-conversion cannot be restored on the Darwin app TUs, which is what #2979 recorded in the frontend/CMakeLists.txt comment and pinned with ci/test_frontend_conversion_optins.py::test_darwin_keeps_the_group_globally_pinned. The issue text's "once the Qt prefixes leave it" is a Qt-deps event, not something this tree can schedule.

    What is actually left is a scoping choice

    • (a) Accept the gap. Nothing to do; the CMake comment and the test are the record, and build(cmake): Drop the conversion pins (-Wno-conversion, -Wno-sign-conversion, -Wno-float-conversion) #2625's remaining-pins ledger inherits one line. Cost: 0.
    • (b) Split the Apple TUs into a second target (sparkle, macos-arc-mm, platform-osx) that opts into the group. Cost: an app-build restructure plus one scheduled.yaml dispatch per iteration (~20–35 min: macOS x86_64 + arm64 + analyze). Any of those TUs that themselves pull QPointer/QSocketNotifier must stay excluded, so the coverage returned is partial.
    • (c) Narrow the exemption instead of the platform: keep the group on for Darwin and put -Wno-sign-conversion only on the TUs the Qt prefixes reach, via SKIP_UNITY_BUILD_INCLUSION + a per-source COMPILE_OPTIONS (the Xcode generator does honour per-source options; the Visual Studio generator does not, which is the shape build(msvc): Compile C/C++ at /W4 and drop the dead /WX link option (#2626) #2691 lost). Cost: it changes the frontend's unity grouping, so it needs the same app-lane dispatch to prove, and PR CI sees none of it.

    Decision needed: which of (a)/(b)/(c)?

    My recommendation is (a) for now — this wall has been measured twice today (#2978, #2979), the warnings come from the universal Qt 6.11 deps rather than obs sources, and (c) buys back only the non-Qt TUs at the cost of a unity restructure. If you want the check back on the Apple TUs, answer (c) and the next tick will open with a unity-group inventory (which frontend TUs pull QPointer/QSocketNotifier) before touching CMake.

    Nothing was claimed, committed or pushed for this — the analysis is the tick's output.

  3. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Decided: (a) accept the gap; keep the Darwin exclusion pinned and close this issue.

    Reasons:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityinfraBuild, gate, CI and toolingreadyMeets the definition of Ready; claimablesize:MAbout a day

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions