Skip to content

fix(frontend): state the app target's Apple conversion pin as a branch (#3096) - #3099

Closed
zackees wants to merge 2 commits into
masterfrom
fix/3096-macos-app-lane-conversion
Closed

zackees wants to merge 2 commits into
masterfrom
fix/3096-macos-app-lane-conversion

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

What

The macOS app lane stops inside Qt 6.11's own headers after #2979/#2950, and one of our own converted units stops on an unflagged float conversion. Two fixes on one lane:

  1. frontend/CMakeLists.txt — the app target asked for -Wsign-conversion behind $<NOT:$<PLATFORM_ID:Darwin>>, inside $<COMPILE_LANG_AND_ID:CXX,...>. On the Xcode generator the macOS lane requires, that nested Darwin exclusion does not reach the TUs: release-gate run 41114625518 at master a8d2cb9a9 (so build(frontend): keep the sign-conversion ratchet off the Darwin TUs (#2950) #2979 was in) still reports -Werror,-Wsign-conversion for frontend.sparkle+.hpp.cpp in qversiontagging.h:80 and qnamespace.h:1926/1930/1935, and for frontend.settings-obshotkeycapture+.hpp.cpp in the run before it. The two platforms are now stated as if(OS_MACOS) / else() branches, which no generator can drop: Apple gets -Wno-sign-conversion as a real compile option, the other lanes keep the ratcheted group exactly as before.
  2. frontend/components/VolumeMeterSnapshot.hpp:32 — the same lane stops on implicit conversion from 'uint64_t' to 'double' may lose precision (-Wimplicit-int-float-conversion, which AppleClang reports without an opt-in). State the conversion at the call site, per build(cmake): Drop the conversion pins (-Wno-conversion, -Wno-sign-conversion, -Wno-float-conversion) #2625.

RED

7108bb9 — test(ci): hold the app target's Apple pin to a branch the Xcode generator applies (#3096)

uv run python -m unittest ci/test_frontend_conversion_optins.py
FAIL: test_darwin_pins_the_group_in_a_branch_the_xcode_generator_honours
AssertionError: '$<NOT:$<PLATFORM_ID:Darwin>>' unexpectedly found in frontend/CMakeLists.txt

The test also holds the opt-in to one block per target: exactly one block may name a positive conversion group, and the pin is asserted to sit on the OS_MACOS branch.

GREEN

04302ce — fix(frontend): state the app target's Apple conversion pin as a branch (#3096)

uv run python -m unittest ci/test_frontend_conversion_optins.py   # 3 tests, OK
./lint                                                            # ok (gersemi reformatted the new branch)

The comment-only change is stripped before the assertions, so a stale comment cannot satisfy the guard.

What I could not verify here

This checkout is Linux; the click that matters — the macOS app lane compiling frontend.sparkle+.hpp.cpp with the pin in place — needs the macOS runner. Refs #3096 on purpose: a dispatched scheduled.yaml run on this branch (or the next nightly on master) is the evidence that closes it. The non-Darwin side was checked on a scratch Ninja project: the flag still lands in FLAGS for the else() branch.

No docs/features.md line: no user-visible behaviour changes.

Test cost: no new Rust tests.

…ator applies (#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
#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
@zackees

zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Superseded by #3100, which carries only the verified half (the volume meter's conversion). This PR also moved the app target's Apple pin into an if(OS_MACOS) branch; the dispatched macOS run on this branch (41119526629) still stopped in the same Qt 6.11 headers with -Werror,-Wsign-conversion, so that experiment did not fix the lane and does not belong in a merged PR. Details on #3096.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant