Skip to content

build(frontend): macOS app lane still stops in Qt 6.11's headers after #2979's Darwin guard #3096

Closed

Description

@zackees

Summary

The macOS app lane is still red on master in Qt 6.11's own headers, exactly the diagnostics #2950 / #2979 were merged to remove. #2979 excluded Darwin from the app target's -Wsign-conversion opt-in; the same class came back in the release-gate run after it merged, so either the guard does not reach the Xcode generator path or another opt-in supplies the flag.

Evidence

Release OBS-Studio-Rust verify-only dispatch run 41114625518 (master a8d2cb9a9, so it includes #2979 / b0f2e8e3a), job Release gate 🚦 / macOS 🍏 (arm64) (124265829819), and the same failure in Build macos arm64 🧱 (124265645931), Build macos x86_64 🧱 (124265646072), Release gate 🚦 / macOS 🍏 (x86_64) (124265829900):

qversiontagging.h:80:  implicit conversion changes signedness: 'int' to 'quintptr' [-Werror,-Wsign-conversion]
                          : symbol(sym), version(currentVersion)
qnamespace.h:1926:     implicit conversion changes signedness: 'Int' to 'int' [-Werror,-Wsign-conversion]
                          : combination(modifiers.toInt() | int(key))
qnamespace.h:1930:     same, both directions
qnamespace.h:1935:     implicit conversion changes signedness: 'const int' to 'unsigned int'
                          return Qt::KeyboardModifiers(combination & Qt::KeyboardModifierMask);

The failing TUs are ours (frontend.sparkle+.hpp.cpp, frontend.settings-obshotkeycapture+.hpp.cpp); every diagnostic sits inside QtCore.framework/Versions/A/Headers/qversiontagging.h / qnamespace.h (Qt 6.11 from obs-deps-qt6-2026-10-25), the exact headers #2979's message named. The diagnostic group is -Wsign-conversion, so the flag is enabled for these TUs despite frontend/CMakeLists.txt's $<$<NOT:$<PLATFORM_ID:Darwin>>:…> guard and the global -Wno-sign-conversion in cmake/common/compiler_common.cmake.

Open question (what the investigation must answer)

Which mechanism enables the group on the Xcode path? Candidates:

  1. The Xcode generator does not expand the nested $<NOT:$<PLATFORM_ID:Darwin>> genex in target_compile_options the way the Ninja generator does, so the flag survives on macOS. build(frontend): keep the sign-conversion ratchet off the Darwin TUs (#2950) #2979 verified the expansion in a scratch project, not in the Xcode generator.
  2. A second opt-in supplies it (plugins/*/CMakeLists.txt conversion blocks, or CMAKE_XCODE_ATTRIBUTE_* in cmake/macos/xcode.cmake).
  3. The Qt include prefixes are not treated as system headers on macOS, so -Wconversion (which AppleClang reports under the -Wsign-conversion sub-group) fires inside them.

Shape of the fix

Exclude the Qt framework header prefixes from the ratchet so the app target can keep the group on Apple TUs (the follow-up #2979's comment already names), or express the Darwin exclusion in a form the Xcode generator honours (if(OS_MACOS) around the block, not a genex). ci/test_frontend_conversion_optins.py pins whichever shape is chosen.

Not filing a guessed patch: the first step is to read the actual OTHER_CFLAGS/-W list of frontend.sparkle+.hpp.cpp from a macOS app build and compare it with what frontend/CMakeLists.txt asks for.

Activity

  1. added
    bug
    P0
    size:M
    on Oct 30, 2026
  2. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: #3096

    1. Read what the macOS app target actually gets: frontend/CMakeLists.txt's conversion block, cmake/common/compiler_common.cmake's global -Wno-sign-conversion, and cmake/macos/xcode.cmake's CMAKE_XCODE_ATTRIBUTE_*, and trace which of the three candidates in the issue can supply -Wsign-conversion to frontend.sparkle+.hpp.cpp under the Xcode generator.
    2. RED: a check in ci/test_frontend_conversion_optins.py (or a sibling test) that asserts the app target's conversion opt-in is expressed in a form both generators honour, failing on the current shape.
    3. GREEN: the mechanism fix the evidence names, with the Qt framework include prefixes excluded from the ratchet where that is the actual cause.
    4. PR against master with the RED/GREEN pair; no Fixes until a macOS app run on master shows the lane green.

    Expect the first PR today. If step 1 shows the cause is outside this repo (an obs-deps Qt packaging change), I will say so on the issue and release rather than guessing a patch.

  3. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    PR #3099 is open with the RED/GREEN pair: frontend/CMakeLists.txt now states the Apple pin as an if(OS_MACOS) branch instead of the nested $<NOT:$<PLATFORM_ID:Darwin>> genex that never reached the Xcode-generated TUs, and VolumeMeterSnapshot.hpp:32 states the uint64_t -> double conversion the same lane stopped on (frontend.widgets+.hpp.cpp). ci/test_frontend_conversion_optins.py holds both shapes and fails on the pre-fix tree.

    Evidence in flight: a dispatched scheduled.yaml run on the branch, 41119526629, which is the only lane that compiles the macOS app target. I am not claiming Fixes until that job is green; if it is still red I will report which TU and which diagnostic survived rather than widening the guard again.

  4. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Two findings from a macOS run on this issue, one of them a fix.

    The app target's opt-in is not the source. I replaced the nested $<NOT:$<PLATFORM_ID:Darwin>> genex with the branch shape this issue named — if(OS_MACOS) giving -Wno-sign-conversion as a real target compile option, else() keeping -Wsign-conversion for the other lanes — and dispatched scheduled.yaml on that branch (41119526629). Build 🧱 / macOS 🍏 (x86_64) at 20:11:10 still reports the identical six -Werror,-Wsign-conversion diagnostics, in frontend.sparkle+.hpp.cpp for qversiontagging.h:80 and qnamespace.h:1926/1930/1935, and again for frontend.settings-obshotkeycapture+.hpp.cpp in the run before it. So the group reaches those TUs despite both the genex and an explicit target-level -Wno-sign-conversion: the enabling flag is in the compile line from somewhere neither candidate 1 nor candidate 2 describes, and "exclude the Qt prefixes from the ratchet" cannot be the fix while the group is on for reasons of its own. That branch is closed as PR #3099; its CMake experiment is not proposed for merge.

    The other diagnostic on that lane is fixed and verified. The same job stops at frontend.widgets+.hpp.cpp on frontend/components/VolumeMeterSnapshot.hpp:32 — implicit conversion from 'uint64_t' to 'double' may lose precision [-Werror,-Wimplicit-int-float-conversion], which AppleClang reports without an opt-in. With the conversion stated at the call site (#3100), that TU compiles at 20:10:04 on the arm64 runner and at 20:10:xx on x86_64 with no diagnostic; the lane now gets as far as the Qt headers and no further.

    Next step for the Qt half. Dump one TU's compile line instead of guessing: .github/scripts/build-macos already has the derived data directory, so a xcodebuild -showBuildSettings for obs-studio plus the CompileC invocation for frontend.sparkle+.hpp.cpp (or a one-off -###/-v on that file) will show every -W in order, including anything Xcode appends after OTHER_CPLUSPLUSFLAGS. That is the evidence the fix needs; I am keeping the claim for it and will post the flags here when a run provides them.

  5. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Root cause found and fixed in #3102: the app target's -Wno-sign-conversion was being overridden by OBS::properties-view's INTERFACE conversion groups, which land after the target's own options. The macOS lane therefore still saw -Wsign-conversion inside Qt 6.11's qversiontagging.h / qnamespace.h.

    #3102 states the app pin in an if(OS_MACOS) branch (the Xcode generator drops the nested Darwin genex) and moves properties-view's group opt-in to the non-Apple branch. Evidence: dispatched run 41123124035 — Build 🧱 / macOS 🍏 (x86_64), (arm64), Build 🧱 / Flatpak 📦 and clang-analyze all pass on head 494781525; the only failure in that run is the known CEF-pin check (#1864).

  6. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Root cause identified and proven: the group arrives through a linked library's INTERFACE options, not through the app target.

    #3067 (in the failing head a8d2cb9a9) ratcheted shared/properties-view with

    target_compile_options(properties-view INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,...>:-Wconversion;-Wsign-conversion;-Wfloat-conversion>")

    obs-studio links OBS::properties-view (frontend/cmake/ui-dialogs.cmake:11), and CMake appends a linked library's INTERFACE options after the consumer's own options and after the directory pins. Observed compile line from a scratch project with that exact shape:

    c++ -Wno-conversion -Wno-sign-conversion -Wno-float-conversion   # cmake/linux/compilerconfig.cmake pins
        -Wconversion -Wsign-conversion -Wfloat-conversion            # OBS::properties-view INTERFACE
        … -c main.cpp
    

    so no consumer-side negative can win, and -Wconversion re-enables the sign group by itself — a preceding -Wno-sign-conversion does not stop it:

    $ clang++ -fsyntax-only -Wno-sign-conversion -Wconversion t.cpp
    warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion]
    $ clang++ -Wno-conversion -Wno-sign-conversion -Wno-float-conversion -Wconversion -Wsign-conversion -Wfloat-conversion -Werror -I mini mini/main.cpp
    mini/fauxqt.h:1:49: error: implicit conversion changes signedness: 'unsigned int' to 'int' [-Werror,-Wsign-conversion]
    # same line without the interface block: clean
    

    That reproduces the exact diagnostic text and group name in qversiontagging.h:80 / qnamespace.h:1926/1930/1935. Candidate 1 in this issue is therefore disproven: a nested $<$<NOT:$<PLATFORM_ID:Darwin>>:…> genex does expand (flags present when the inner condition is true, nothing when it is false), so #2979's guard was fine and the if(OS_MACOS) rewrite in PR #3102 is robustness, not the fix. Candidate 3 (Qt prefixes not system headers) is a real amplifier but not the mechanism.

    Status: PR #3102 carries the fix (properties-view's interface block contributes none of the three groups on Apple) with macOS acceptance — dispatched run 41123124035, both app builds and clang-analyze green. Its VolumeMeterSnapshot.hpp half is the same hunk as #3100, which I closed as superseded so the queue does not get two copies. The class-level pin (any future INTERFACE ratchet must exclude Darwin) is the remaining gap; it is invisible to PR CI because no PR lane builds the app.

  7. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Fixed by #3102 (merged as 91a9934ed), with the review corrections and the class-wide pin in #3106.

    What fixed it: it was not the generator. OBS::properties-view states its three conversion groups as INTERFACE options, so CMake appends them to every consumer's compile line after the consumer's own -Wno-sign-conversion, and -Wconversion re-enables -Wsign-conversion diagnostics — the group was on for frontend.sparkle+.hpp.cpp and frontend.settings-obshotkeycapture+.hpp.cpp inside qversiontagging.h / qnamespace.h no matter what frontend/CMakeLists.txt said. The INTERFACE block now gives Apple none of the three groups and pins -Wno-sign-conversion instead; the app target's own opt-in and pin are stated as if(OS_MACOS) branches.

    Evidence: dispatched scheduled.yaml run 41123124035 on 494781525 — Build 🧱 / macOS 🍏 (x86_64), (arm64) and Analyze / macOS (clang-analyze) all success, where the previous head stopped at qversiontagging.h:80 / qnamespace.h:1926.

    Remaining: the class is now pinned offline by ci/test_conversion_ratchet.py (reports shared/properties-view/CMakeLists.txt: properties-view on the pre-fix tree). The Qt include prefixes are still inside the ratchet, so a future INTERFACE group re-breaks the app lane the same way — that exclusion is still worth doing, but it is no longer invisible to CI.

  8. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Closed by evidence: the macOS app lane is green on master after #3102.

    Release OBS-Studio-Rust verify-only dispatch on master 91a9934ed (the commit that merged #3102), run 41133870419 — status: success, no failing jobs:

    job result
    Build macos arm64 🧱 success
    Build macos x86_64 🧱 success
    Release gate 🚦 / macOS 🍏 (arm64) success
    Release gate 🚦 / macOS 🍏 (x86_64) success
    Release gate 🚦 / Flatpak 📦 success
    Release gate 🚦 / Flatpak Saved Profile 🧪 success
    Native macOS arm64 DMG startup 🧪 success
    Native macOS x86_64 DMG startup 🧪 success

    The six -Werror,-Wsign-conversion diagnostics in qversiontagging.h:80 and qnamespace.h:1926/1930/1935 for frontend.sparkle+.hpp.cpp and frontend.settings-obshotkeycapture+.hpp.cpp no longer appear, and the app targets compile on both macOS runners. That matches the root cause recorded above: OBS::properties-view's INTERFACE conversion group landed after the app target's own pins, so no consumer-side -Wno-sign-conversion could win; #3102 moved the group to the non-Apple branch and stated the app pin in an if(OS_MACOS) branch, which the Xcode generator honours.

    No new issue is needed. The general ratchet remains open on #2625.

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

Metadata

Metadata

Assignees

Labels

P0bugsize:M

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions