Skip to content

fix(frontend): state the browser dock loop's size conversion (#3083) - #3084

Merged
zackees merged 1 commit into
masterfrom
fix/3083-docks-browser-conversion
Oct 30, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/3083-docks-browser-conversion

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

What

One line in frontend/widgets/OBSBasic_Docks.cpp.hpp that the app target's -Werror=conversion rejects:

 #ifdef BROWSER_AVAILABLE
-for (int i = extraBrowserDocks.size() - 1; i >= 0; i--) {
+for (int i = static_cast<int>(extraBrowserDocks.size()) - 1; i >= 0; i--) {

18f8a3f22 (#2909) converted the two neighbouring loops (extraDocks, extraCustomDocks) but this one is inside #ifdef BROWSER_AVAILABLE, which the frontend-ON replay behind that commit did not define, so it was missed.

Fixes #3083.

RED

Local probe: the exact compile line from the failing release job (Build linux x86_64 🧱, run 41083530569), run as -fsyntax-only against origin/master's tree (3edcda476):

frontend/widgets/OBSBasic_Docks.cpp.hpp: In member function 'void OBSBasic::on_lockDocks_toggled(bool)':
frontend/widgets/OBSBasic_Docks.cpp.hpp:128:47: error: conversion from 'qsizetype' {aka 'long long int'} to 'int' may change value [-Werror=conversion]
  128 |         for (int i = extraBrowserDocks.size() - 1; i >= 0; i--) {
cc1plus: all warnings being treated as errors

The same error is in the CI logs twice: the Build linux x86_64 🧱 job (124158735194) and Release gate 🚦 / Ubuntu 🐧 (OBS-Studio-Rust) (124158964398).

GREEN

Same command on this branch, no other change:

$ <same g++ argv, -fsyntax-only>
$ echo $?
0

(Zero output. The probe needed the NixOS Qt 6.12/SIMDE/nlohmann headers locally and a generated ui-config.h/ui_*.h set, all outside the tree; SIMDE had to be -isystem, otherwise the host's SIMDE copy raises its own warnings.)

No offline test

A compiler warning cannot be pinned without an app-target configure, which PR CI does not run — the same reason #2909's miss was invisible before merge. The GREEN evidence is the release lane on the next schedule run; I will not queue this on PR CI alone as app-build proof.

@zackees
zackees enabled auto-merge October 30, 2026 17:20
@zackees

zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • Local -fsyntax-only probe of the frontend.widgets-2+ unity unit (the exact argv from the failing release job, with BROWSER_AVAILABLE defined): RED on origin/master 3edcda476 at OBSBasic_Docks.cpp.hpp:128:47, GREEN (exit 0, no output) on this branch.
  • PR CI: Fast Gate ⚡ and Qt Frontend Linux 🐧 both green, everything else skipping (this touches only frontend/).
  • gh pr merge --auto set (merge method MERGE, as master requires the queue).

This is an app-lane fix that PR CI does not fully prove: the definitive GREEN is Build linux x86_64 🧱 / Release gate 🚦 / Ubuntu 🐧 on the next Daily OBS-Studio-Rust beta run.

@zackees

zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Re-ran the Sanitize / asan job (run 41097086538, job 124205818560). The failure is not this PR's change: build.log in the sanitize-asan artifact shows zccache refusing every compile on that cache root —

zccache[err][D]: daemon unavailable at .../.sanitize-zccache/v1.15.5/daemon-v1.15.5.sock
(daemon recovery already failed on this cache root and is in its cool-down)
refusing to run /usr/bin/c++ uncached
FAILED: [code=125] ... test_fallback_warning_queue.cpp.o
ninja: build stopped: cannot make progress due to previous errors.

No compiler diagnostic, no OBS finding (Triage: "OBS findings: None"), and Qt Frontend Linux green on the same commit. Single-job rerun requested; the PR's own lanes stay as they were.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: correct. It matches the two neighbouring loops converted in #2909, the RED/GREEN compile probe is recorded, and it's a build fix with no user-visible change, so no ledger line is needed.

@zackees
zackees added this pull request to the merge queue Oct 30, 2026
Merged via the queue into master with commit 8e42183 Oct 30, 2026
121 of 124 checks passed
@zackees
zackees deleted the fix/3083-docks-browser-conversion branch October 30, 2026 18:26
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 31, 2026
…bs-rust#3119)

The ratchet is checked by whatever last compiled the target, and every Linux
configuration here is gcc. gcc has no -Wimplicit-int-conversion and no
-Wimplicit-int-conversion-on-negation and a narrower -Wsign-conversion set, so
a target can pass its gcc replay and still fail the nightly's AppleClang app
build — which is how obs-rust#3084 and obs-rust#3090 escaped in two days.

`ci/conversion_clang_replay.py` replays a configured tree's unity groups with
`clang -fsyntax-only` and the conversion group, taking each group's own flags
from `compile_commands.json`: the global `-Wno-conversion` pins come out, the
target's other pins and includes stay, `-Werror` comes out so every site is
reported rather than the first, and nothing is written or linked. Coverage is
the ratchet's own list (`conversion_ratchet.ratcheted_dirs()`), never a copy, so
the PR that opts a target in is covered without touching this file.

Three silent-pass paths are closed by the tool itself, each with a test:
a ratcheted directory the configuration compiled no group for is reported, a
group that died before parsing (missing header) is reported instead of reading
as clean, and a finding inside a dependency header or a clang
unused-command-line-argument artifact is not counted.

Measured on this host, 73 unity groups out of a `build/` tree (clang 21.1.8,
conversion pins removed): 6.0 s wall at 8 jobs, 34.6 s serially, slowest group
1.9 s. 69 of the 73 parse here; the other four need the va/X11 dev headers this
Nix checkout does not carry, which is one more reason the replay belongs in the
validate image rather than a bare runner.

With the pins removed clang reports 7 sites in 4 directories that gcc reports as
zero on the same TUs and flags — `libobs/obs-source-transition.c.h:836`,
four in `plugins/obs-filters`, two in `plugins/linux-v4l2` and one in
`plugins/linux-pipewire` — the obs-rust#2921/obs-rust#3090 shape (`long long`/`int` into an
enum, `int` into an unsigned).

Not wired into a lane yet, and no test or public header changed: this PR is the
tool and its guard tests, so the lane step can be reviewed on its own
(ci.toml allow entry, `uv run --no-project`, the setup-uv save-cache
expression). Refs obs-rust#3118.

Tests: `uv run python -m unittest ci/test_conversion_clang_replay.py`, 16 tests,
0.01 s, no compiler invoked and no own threads.
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 31, 2026
…lane (obs-rust#3118) (obs-rust#3120)

* test(ci): pin the clang replay's lane verdict and compile database (obs-rust#3118)

The replay tool landed in obs-rust#3119 with no caller. This adds the two pins the
caller needs before it can be wired in: the verdict function behind the exit
status (a finding and a group that did not parse are red, a ratcheted
directory a lane tree does not build is not), and the compile database on the
sanitizer configure line the replay reads.

Red on master: ci/test_conversion_clang_replay.py cannot import exit_status and
test_sanitize_harness' configure case reports
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' not found.

* fix(libobs,plugins): state the conversions clang's ratchet reports (obs-rust#3118)

Replaying this tree's unity groups with clang (obs-rust#3119) reports eight sites the
gcc configuration does not, all in directories the ratchet already covers:

  libobs/obs-source-transition.c.h:836   size_t -> enum obs_transition_target
  plugins/obs-filters/hdr-tonemap-filter.c.h:72,82
  plugins/obs-filters/sdr-on-hdr-filter.c.h:67,74
  plugins/linux-v4l2/v4l2-busy.c.h:168   int -> uint32_t
  plugins/linux-v4l2/v4l2-input.c.h:150  int -> enum video_range_type
  plugins/linux-pipewire/camera-portal.c.h:1062

Each is the explicit conversion the compiler already performed implicitly, so
no value changes and no warning is disabled. Two of the four directories
(libobs, obs-filters) are compiled by the macOS app lane, so these were escapes
waiting for the next nightly rather than Linux-only curiosities.

Verify: uv run --no-project ci/conversion_clang_replay.py --compdb
build/compile_commands.json before (8 findings, 4 groups) and after (0).

* infra(ci): replay the conversion ratchet with clang in the sanitizer lane (obs-rust#3118)

The ratchet is checked by whichever configuration compiles the target, and
every Linux one of those is gcc; gcc has no -Wimplicit-int-conversion and a
narrower -Wsign-conversion set, so a target can pass its own gcc replay and
still fail the nightly's AppleClang app build (obs-rust#3084, obs-rust#3090, obs-rust#2921 in one
week).

The sanitizer asan job already builds the whole app on the PR that changes a
ratcheted target (obs-rust#2923, ci/conversion_ratchet.py), so it is the lane that can
afford a second compiler. Its configure line now exports
compile_commands.json, and one step replays every unity group with
clang -fsyntax-only plus the three conversion groups: 73 groups in ~7 s, no
build and no link.

--allow-uncovered exists because the sanitizer configuration deliberately
turns vlc, vst, webrtc and the decklink plugins off: those ratcheted
directories have no group in the tree and are reported, not failed. A real
finding or a group that did not parse is still red. The strict default stays
for a full app tree.

* fix(ci): swap the compiler launcher as well as the compiler (obs-rust#3118)

The sanitizer tree configures zccache as CMAKE_C_COMPILER_LAUNCHER, so its
compile database entries read "zccache <compiler> <flags> …". Replacing only
the first token handed clang the real compiler path as an input file, so the
lane would have failed on every group. Drop the leading non-flag tokens and
pin it with a case over a launched entry.
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.

bug(frontend): the Linux app build fails on the browser dock loop's qsizetype conversion

1 participant