Repository navigation
build(frontend): keep the sign-conversion ratchet off the Darwin TUs (#2950) - #2979
Conversation
RED: test_darwin_keeps_the_group_globally_pinned fails on master - the obs-studio target's -Wsign-conversion block has no Darwin guard, which is where every remaining macOS app-lane diagnostic comes from.
…2950) GREEN. The macOS app lanes fail only inside Qt 6.11's own headers (qversiontagging.h:80, qkeycombination.h:1926/1930/1935, qnamespace.h), all -Werror,-Wsign-conversion and none of them an obs source. Excluding Darwin from the target's opt-in restores the macOS build and the release lane; Apple-only frontend files keep the global -Wno-sign-conversion pin until the Qt include prefixes can be excluded from the ratchet (follow-up on #2950). Verified: gersemi 0.25.0 clean, ci/test_frontend_conversion_optins.py green, and a scratch CMake project shows the genex expands to -Wsign-conversion off Darwin and to nothing when the platform matches.
GREEN, measured —
|
| Job | Result |
|---|---|
Build 🧱 / macOS 🍏 (arm64) |
success |
Build 🧱 / macOS 🍏 (x86_64) |
success |
Analyze 🔬 / macOS 🍏 (clang-analyze) |
success |
Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust) |
success |
Build 🧱 / Flatpak 📦 |
success |
The only failing job in the run is CEF Chromium Support 🌐, the by-design CEF 7871 failure tracked by #1864/#1092 — it fails the same way on master.
Before this branch, the same lanes stopped on the five -Werror,-Wsign-conversion diagnostics inside qversiontagging.h / qkeycombination.h / qnamespace.h (master e2782b4ac, run 40983897736, job 123830620422). The approach on infra/2950-qt-system-includes (-iframework) was re-run at the same time and its macOS arm64 job still failed (run 40996358276), so this is the path with lane evidence today.
Local checks: ci/test_frontend_conversion_optins.py 3/3 OK, gersemi 0.25.0 --check clean, uv run ci/local_gate.py --only self-test == ok (one pulse-harness flake on the first pass, green on the re-run), and the genex itself expands to -Wsign-conversion off Darwin and to nothing when the platform matches.
Handing off unqueued: this trades away -Wsign-conversion on Apple-only frontend TUs, which is the maintainer's call against restoring it on the -iframework path — say which and the other PR closes.
#3096) The macOS app lane builds with the Xcode generator, and a $<NOT:$<PLATFORM_ID:Darwin>> genex inside target_compile_options does not reach its TUs: master's release-gate macOS jobs stop in Qt 6.11's own headers (qversiontagging.h:80 "int to quintptr", qnamespace.h:1926/1930/1935) with -Werror,-Wsign-conversion although frontend/CMakeLists.txt asks for the opposite, so #2979's guard never took effect on that generator. State the two platforms as an if(OS_MACOS)/else branch: Apple gets the -Wno-sign-conversion pin as a real compile option, the other lanes keep the ratcheted group. Linux/Windows configure output is unchanged (checked on a scratch project: the flag is still in the non-Darwin FLAGS). Same lane, second diagnostic: frontend.widgets+.hpp.cpp stops on frontend/components/VolumeMeterSnapshot.hpp:32, "implicit conversion from 'uint64_t' to 'double' may lose precision" (-Wimplicit-int-float-conversion), which AppleClang reports by default. State the conversion at the call site. Green: uv run python -m unittest ci/test_frontend_conversion_optins.py (3 tests OK), ./lint ok (gersemi reformat of the new branch). Refs #3096
… interface group (obs-rust#3096) (obs-rust#3102) * test(ci): hold the app target's Apple pin to a branch the Xcode generator applies (obs-rust#3096) The Darwin half of the app target's conversion genex does not reach macOS app TUs: master's release-gate macOS jobs stop in Qt 6.11's own headers (qversiontagging.h:80, qnamespace.h:1926/1930/1935) with -Werror,-Wsign-conversion even though frontend/CMakeLists.txt asks for the opposite. Assert the pin as an if(OS_MACOS) branch instead, which no generator can drop, and fail while the tree states it inside $<NOT:$<PLATFORM_ID:Darwin>>. Red: uv run python -m unittest ci/test_frontend_conversion_optins.py FAIL: test_darwin_pins_the_group_in_a_branch_the_xcode_generator_honours '$<NOT:$<PLATFORM_ID:Darwin>>' unexpectedly found * fix(frontend): state the app target's Apple conversion pin as a branch (obs-rust#3096) The macOS app lane builds with the Xcode generator, and a $<NOT:$<PLATFORM_ID:Darwin>> genex inside target_compile_options does not reach its TUs: master's release-gate macOS jobs stop in Qt 6.11's own headers (qversiontagging.h:80 "int to quintptr", qnamespace.h:1926/1930/1935) with -Werror,-Wsign-conversion although frontend/CMakeLists.txt asks for the opposite, so obs-rust#2979's guard never took effect on that generator. State the two platforms as an if(OS_MACOS)/else branch: Apple gets the -Wno-sign-conversion pin as a real compile option, the other lanes keep the ratcheted group. Linux/Windows configure output is unchanged (checked on a scratch project: the flag is still in the non-Darwin FLAGS). Same lane, second diagnostic: frontend.widgets+.hpp.cpp stops on frontend/components/VolumeMeterSnapshot.hpp:32, "implicit conversion from 'uint64_t' to 'double' may lose precision" (-Wimplicit-int-float-conversion), which AppleClang reports by default. State the conversion at the call site. Green: uv run python -m unittest ci/test_frontend_conversion_optins.py (3 tests OK), ./lint ok (gersemi reformat of the new branch). Refs obs-rust#3096 * fix(properties-view): keep the Apple pin on the interface group (obs-rust#3096) The target's conversion flags are INTERFACE, so they reach the app target's Apple TUs after the target's own -Wno-sign-conversion and re-enable the group inside Qt 6.11's headers. State the pin on an OS_MACOS branch, the shape the Xcode generator honours.
…t#3096) (obs-rust#3106) * docs(ci): state the INTERFACE ordering as the cause, not the genex (obs-rust#3096) The removed comments claimed the Xcode generator does not apply the Darwin half of a `$<NOT:$<PLATFORM_ID:Darwin>>` genex. A scratch project with the same shape shows the genex expands in both generators, so that was never the mechanism: `OBS::properties-view` adds its groups as INTERFACE options, CMake appends them after the consumer's own, and `-Wconversion` re-enables `-Wsign-conversion` diagnostics. Only the INTERFACE block can fix it; the `if(OS_MACOS)` branch stays because it keeps the pin a visible compile option. No code change: comments, docstrings and one test name. * test(ci): pin Darwin out of every INTERFACE conversion group (obs-rust#3096) `target_compile_options(<t> INTERFACE -Wconversion ...)` is appended to every consumer's compile line after the consumer's own options, and `-Wconversion` re-enables `-Wsign-conversion` diagnostics, so a consumer-side `-Wno-sign-conversion` is not a pin. That is how the macOS app lane kept stopping inside Qt 6.11's headers after obs-rust#2979, and no PR lane builds the app, so the class has no CI oracle of its own. `interface_darwin_violations()` reads it from the tree: a positive group in an INTERFACE call must either exclude Darwin with a `$<NOT:$<PLATFORM_ID:Darwin>>` genex or sit in the `else()` branch of an `if(OS_MACOS)` block. Comments are stripped first, so a commented-out guard cannot satisfy the check. RED: on `91a9934ed^` the tree-level check reports `shared/properties-view/CMakeLists.txt: properties-view`, the file obs-rust#3102 fixed. GREEN: it reports nothing on this tree; the five fixture cases cover the bare group, both exempt shapes, a comment-only guard and a pinned call.
Refs #2950, Refs #2938
Master's macOS app lanes (and the release lane behind them) stop inside Qt 6.11's own headers, not in obs code. Every remaining diagnostic in
Build 🧱 / macOS 🍏 (arm64)job123830620422(run40983897736, mastere2782b4ac) is-Werror,-Wsign-conversion, and all five sites are third-party:They are warned about because
frontend/CMakeLists.txtre-enables-Wsign-conversionfor the wholeobs-studiotarget (#2625). This PR keeps that opt-in for every other platform and excludes Darwin from it, which restores the app and release lanes without touching a single obs source.RED
25b7491fe—ci/test_frontend_conversion_optins.py::test_darwin_keeps_the_group_globally_pinnedfails on master (guardedis empty,namedis-Wsign-conversion).GREEN
60b8aefc5— the opt-in is$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU>:$<$<NOT:$<PLATFORM_ID:Darwin>>:-Wsign-conversion>>.uv run python -m unittest ci/test_frontend_conversion_optins.py— 3 tests, OK.--check frontend/CMakeLists.txt— clean.-Wsign-conversionoff Darwin, and to nothing when the platform matches ($<NOT:$<PLATFORM_ID:Linux>>on Linux printed[]), which is the Darwin branch.uv run ci/local_gate.py --only self-test— see the checks below.Cost, stated
The group is per-target, so Apple TUs as a whole lose
-Wsign-conversion, including the Apple-only frontend files (sparkle,macos-arc-mm,platform-osx) that#2946/#2947just made clean. The alternative (option A on the issue) is to exclude the Qt include prefixes from the ratchet so those files keep the check; PR#2978tried-isystemand the Xcode generator path dropped it. The test pins that every conversion group the target names carries the Darwin guard, so restoring coverage later is a one-line change to that test plus the CMake block.Tiers: no Rust, C test, protocol or runtime change — a build-flag scope change only, so Tier 1–4 do not apply. Not user-visible, so no
docs/features.mdline.