Skip to content

build: state the macOS conversion sites the mac lanes stop on (#2950) - #2951

Merged
zackees merged 3 commits into
masterfrom
fix/2950-macos-conversion-sites
Oct 29, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/2950-macos-conversion-sites

Conversation

@zackees

@zackees zackees commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

RED

Master's macOS lanes on c2df54a7f (scheduled.yaml dispatch, run 40920717013, on top of #2947):

  • Analyze 🔬 / macOS 🍏 (clang-analyze) job 123612882619 — frontend/utility/platform-osx.mm.hpp:238,239,768: implicit conversion loses floating-point precision: 'double' to 'float' and implicit conversion turns floating-point number into integer: 'CGFloat' (double) to 'int'.
  • Build 🧱 / macOS 🍏 (x86_64) job 123615941678 — shared/properties-view/properties-view.cpp.hpp:1872: implicit conversion turns floating-point number into integer: 'double' to 'bool'.

What changed

Each site states its conversion in place, the shape the ratchet's earlier fixes use; no flag, pin or target change.

Site Change
platform-osx.mm.hpp:238 0.45 → 0.45f
platform-osx.mm.hpp:239 static_cast<int>(size.width/height) for QIcon::pixmap(int, int)
platform-osx.mm.hpp:768 static_cast<float>(height * 0.8)
properties-view.cpp.hpp:1872 data.value<double>() != 0.0
PluginModuleLoader_MacOS.mm.hpp:128,160,172 resize(static_cast<std::string::size_type>(bufferSize))
shared/qt/platform/qt-host-macos.cpp.hpp:43 return static_cast<uint32_t>(obsModifiers) (the posix sibling's shape)
update-helpers.cpp.hpp:15,16 str.resize(static_cast<size_t>(size)), vsnprintf(…, static_cast<size_t>(size), …)
WhatsNewInfoThread.cpp.hpp:33,53,57 write(…, static_cast<std::streamsize>(data.size())), size_t size = static_cast<size_t>(fileStream.tellg()), read(…, static_cast<std::streamsize>(size))
WhatsNewInfoThread.cpp.hpp:86,177 size_t read = static_cast<size_t>(file.gcount()), static_cast<size_t>(signature.size())

Value semantics are unchanged: the label height keeps its double arithmetic and narrows once, so the returned float is bit-identical (ci/test_dialog_platform_facade compares its bytes, and the first float-arithmetic version failed that test); the combo bool keeps nonzero-is-true; each resize is already guarded by bufferSize > 0.

GREEN evidence

The same scheduled.yaml dispatch on this branch, three macOS jobs (clang-analyze, build arm64, build x86_64) past every file above.

Rounds so far, each one clearing the file it reached and reporting the next:

  1. 40927604102 (job 123637185221) — analyze passed platform-osx.mm.hpp, reported only PluginModuleLoader_MacOS.mm.hpp's three sign conversions (commit 2).
  2. 40930123390 (job 123648524010) — build arm64 passed those and stopped at qt-host-macos.cpp.hpp:43 (commit 3).
  3. 40933515635 on 07e72dfcb — all three macOS jobs passed qt-host-macos.cpp.hpp and stopped at update-helpers.cpp.hpp:15,16 plus the five WhatsNewInfoThread.cpp.hpp sites (commit 4, e54bf8092).
  4. 40936503160 on e54bf8092 — the three macOS jobs passed every file in this PR and then stopped inside the universal Qt 6.11 deps' own headers (qnamespace.h:1926,1930,1935, qversiontagging.h:80), which no call-site cast here can state. The PR stays a draft; see the comment below on the build-system decision that class needs.

Local: ./lint ok, uv run ci/test_dialog_platform_facade.py ok.

Tiers that do not apply: no Rust unit, C test, protocol or runtime behaviour change.

Refs #2950

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Round 4 is in (e54bf8092): update-helpers.cpp.hpp:15,16 and the five WhatsNewInfoThread.cpp.hpp sites (:33, :53, :57, :86, :177) now state their conversions, and PR CI/local ./lint are green.

The dispatch on it (40936503160) got past those, but the next class is not in this tree: all three macOS jobs now fail on six -Wsign-conversion errors whose locations are inside the universal Qt 6.11 deps' own headers:

.deps/obs-deps-qt6-2026-10-25-universal/lib/QtCore.framework/Headers/qnamespace.h:1926  QKeyCombination ctor  ('Int' -> 'int', and 'int' -> 'Int')
.deps/obs-deps-qt6-2026-10-25-universal/lib/QtCore.framework/Headers/qnamespace.h:1930  same ctor, same two
.deps/obs-deps-qt6-2026-10-25-universal/lib/QtCore.framework/Headers/qnamespace.h:1935  Qt::KeyboardModifiers(combination & Qt::KeyboardModifierMask)  ('const int' -> 'unsigned int')
.deps/obs-deps-qt6-2026-10-25-universal/lib/QtCore.framework/Headers/qversiontagging.h:80  QVersionTag(sym, currentVersion)  ('int' -> 'quintptr')

Reproduced outside this PR on the same Qt version with a two-line TU: clang++ -fsyntax-only -Wsign-conversion -I<qt>/include -I<qt>/include/QtCore on #include <QPointer> emits qversiontagging.h:80 immediately — i.e. these are parse-time warnings from Qt's headers being treated as user headers in the TU that reaches them (frontend.signal-posix+.hpp.cpp in these logs; QPointer/QSocketNotifier are in frontend/build/frontend-signal-posix.pch.hpp). The other frontend groups do not report them, so something about that group's include path (or its PCH not being reused) differs, and the fix is a build-system/flag decision (deps as -isystem, or PCH/include-list repair), not a call-site cast — there is no conversion in frontend/utility/platform-signal-posix.cpp.hpp to state.

So I stopped casting here instead of guessing: the branch is draft, the four commits above are the honest source-side fixes, and this needs a maintainer call. Refs #2950.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Routed the open question to #2950 as a recognised Decision needed: (the bot now shows decision-needed + claim-blocked there): three options for the Qt deps' headers under -Wsign-conversion (-isystem for .deps, repair this unity group's include path/PCH reuse, or stop the burndown and keep the pins #2944 restored).

This PR stays draft and unchanged until that answer. The four commits on it are the honest source-side half.

Refs #2950

The conversion ratchet's macOS lanes reported the next files after the
qt-host and obs-outputs sites were stated:

- frontend/utility/platform-osx.mm.hpp:238 `float iconSize = 0.45` narrows
  a double literal; 239 passes `size.width`/`size.height` (CGFloat,
  double) to `QIcon::pixmap(int, int)`; 768 computes `height * 0.8` in
  double and returns it as float.
- shared/properties-view/properties-view.cpp.hpp:1872 passes
  `data.value<double>()` to `obs_data_set_bool`, an implicit double to bool.

Every site states the conversion in place, the shape the earlier ratchet
fixes use, with no flag, pin or target change. The label height keeps its
double arithmetic and narrows once (`static_cast<float>(height * 0.8)`),
so the value is bit-identical to before; `ci/test_dialog_platform_facade`
compares that float's bytes and caught the first, float-arithmetic
version. The combo bool keeps its nonzero-is-true meaning.

Refs #2950
The first macOS analyze run of this branch (40927604102, job 123637185221)
cleared `platform-osx.mm.hpp` and reached the next file: three
`resize(bufferSize)` calls in `PluginModuleLoader_MacOS.mm.hpp` (128, 160,
172) narrow the `int` returned by `os_get_config_path` /
`os_get_program_data_path` to `std::string::size_type`
(`-Wsign-conversion`).

Each call is already guarded by `bufferSize > 0`, so the stated cast cannot
underflow; no flag, pin or target change.

Refs #2950
…2950)

The ratchet's next class after qt-host-macos: the update helpers narrow a
vsnprintf length to std::string::size_type, and WhatsNewInfoThread crosses
std::streamsize/streamoff against size_t at five call sites (a QByteArray
signature length included). Each is a static_cast stating the conversion,
with the values already bounded by the stream and buffer guards.
@zackees
zackees force-pushed the fix/2950-macos-conversion-sites branch from e54bf80 to 39b9269 Compare October 29, 2026 20:46
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Rebased onto origin/master (5f166c9e6) — no content change, still a draft waiting on #2950's Decided:.

Why: the Fast Gate ⚡ red on e54bf8092 was not this branch. It was tests::video::video_io::align_divisor_restarts_the_phase (rust/obs-media-io/tests/video/video_io.rs:600, left: 3), the flake that #2958 fixed on master as b25c5ebc7; this branch's head predated that commit, so the lane ran the unfixed test. After the rebase the branch carries the fix, and the three conversion commits are unchanged (git diff origin/master --stat = the same 5 files).

Local: ./lint ok. The macOS evidence lane is the scheduled.yaml dispatch, and there is nothing new to dispatch until the Qt-deps include-path/PCH question on #2950 is answered — a rebase cannot change those header sites.

Refs #2950

@zackees
zackees marked this pull request as ready for review October 29, 2026 22:36
@zackees
zackees added this pull request to the merge queue Oct 29, 2026
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

Merged via the queue into master with commit 217b3cf Oct 29, 2026
40 checks passed
@zackees
zackees deleted the fix/2950-macos-conversion-sites branch October 29, 2026 22:47
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Oct 30, 2026
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