Skip to content

fix: repair the macOS release lane after the #2625 conversion ratchets (#2625) - #2789

Merged
zackees merged 2 commits into
masterfrom
fix/text-freetype2-find-font-sign-conversion
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/text-freetype2-find-font-sign-conversion

Conversation

@zackees

@zackees zackees commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Repairs the release lane after the #2625 ratchet slices. Every check that runs on a PR builds the Linux unity groups with GCC, so three AppleClang-only or macOS/Windows-only diagnostics reached master and broke the daily candidate build. Nothing here changes behaviour: the casts and the comparison keep the values the code already computed.

1. text-freetype2 (from #2755)

RED: verify-only run 40684548610, macOS x86_64/arm64 app builds:

[text-freetype2] Compiling text-freetype2.find-font+.h.c
##[error]implicit conversion changes signedness: 'int' to 'size_t' [-Werror,-Wsign-conversion]
   58 |         da_resize(font_list, count);
##[error]implicit conversion changes signedness: 'FT_Int' (aka 'int') to 'size_t' [-Werror,-Wsign-conversion]
  218 |         da_reserve(sizes, face->num_fixed_sizes);

plugins/text-freetype2/CMakeLists.txt puts build/text-freetype2.find-font+.h.c (which includes find-font.c.h) only in the windows+ and macos+ unity groups; Linux builds find-font-unix.c.h instead, so no Linux lane ever compiles those two lines.

GREEN c5f292f60: (size_t)count and (size_t)face->num_fixed_sizes at the call sites. The implicit conversion happened inside da_resize()/da_reserve() before this PR, so the value passed is identical.

Local reproduction (temporary change, not in this PR): add the find-font group to the Linux target for one build in the obs-rust-linux-validate image → the same two diagnostics; after the casts, neither is reported (the only remaining error is a -Wshadow from the temporary double include of find-font.c.h on Linux, which the real groups do not do).

2. image-source (from #2753)

RED: verify-only run 40689520273, macOS x86_64/arm64 app builds:

##[error]plugins/image-source/obs-slideshow.c.h:983 implicit conversion turns floating-point number into integer: 'float' to 'bool' [-Werror,-Wfloat-conversion]
  983 |     if (!ss->transition || !ss->slide_time)

GCC does not flag a float in boolean context, so the Linux slices and PR CI stayed green; AppleClang does.

GREEN 492f56d85: !ss->slide_time is written as ss->slide_time == 0.0f, which is what ! computed (a NaN was already false). Same value tested, no conversion.

Verification

  • ./lint clean on both commits.
  • Windows is already proven on this branch: run 40689520273 built and launched the Windows app for x64 and arm64 — Build windows x64/arm64, Release gate Windows x64/arm64, Launch packaged Windows x64/arm64 all success.
  • macOS is the remaining check: a fresh gh workflow run release-rust.yaml --ref fix/text-freetype2-find-font-sign-conversion -f verify_only=true is dispatched against 492f56d85. I had dequeued this PR from the merge queue to add the second fix (a queued branch cannot be pushed to); it should be re-queued only after that run's macOS jobs are green, since no PR lane builds the macOS app.

Refs #2625

…build flags (#2625)

#2755 enabled -Wconversion/-Wsign-conversion on the text-freetype2 target,
but the Linux lane never compiles find-font.c.h: the nix unity group uses
find-font-unix.c.h, and find-font.c.h is only in the windows+ and macos+
groups. So the ratchet looked clean on Linux while the release lane's
macOS and Windows app builds failed:

  find-font.c.h:58:30: da_resize(font_list, count) - int -> size_t
  find-font.c.h:218:31: da_reserve(sizes, face->num_fixed_sizes) -
                        FT_Int -> size_t

Both casts keep the value the code already passed (the implicit conversion
happened inside da_resize/da_reserve). Red run 40684548610 (arm64 job
122803565099) is the evidence; reproduced locally by adding the find-font
unity group to the Linux target for one build:

  find-font.c.h:58  conversion to size_t from int
  find-font.c.h:218 conversion to size_t from FT_Int
  -> after the casts: neither diagnostic (only the shadow error the
     temporary double include provokes on Linux, absent on the real
     Windows/macOS build).

Refs #2625

@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: the diff is correct and the fix is proven — the remaining red checks are master's, not this PR's.

Read against origin/master (40d717db7, which this branch already contains) and against the release-lane run on this head (40689520273).

What I checked:

  • The two casts keep exactly the value the code already passed: da_resize() / da_reserve() take size_t, so the implicit conversion happened inside the call before this change. count comes from the cached list and face->num_fixed_sizes from FreeType; both are non-negative at those call sites, so the cast is a widening, not a truncation. No product behaviour changes and no docs/features.md line is owed (no user-visible change).
  • The fix works where the original failure happened: in that macOS run the log shows [text-freetype2] Compiling text-freetype2.find-font+.h.c at 12:43:38 with no diagnostic for it, and the build went on to fail four seconds later in a different file. So the two -Wsign-conversion errors this PR targets are gone.
  • The failing checks on this head are the two macOS app builds and their release gates, and they fail on master's code, not on this diff: plugins/image-source/obs-slideshow-mk2.c.h:830, implicit conversion turns floating-point number into integer: 'float' to 'bool' [-Werror,-Wfloat-conversion] at if (!ss->transition || !ssd->slide_time) (slide_time is float, declared at :95). This file is untouched by the PR and reaches the warning from the image-source conversion slice (#2753) — it is the C++ replay case #2625 lists as still to come. I reproduced the diagnostic in C++ mode locally with clang 21.1.8 on a minimal !float and confirmed the C-mode replay of image-source.core+.h.c is clean, which is why the Linux lanes never saw it.
  • Everything else on the head is green: 55 passed, plus the Rust Tier 2 Linux jobs and Qt Frontend Linux; the 8 in-flight jobs are the queue-independent ones.

So: no change requested to this PR. I am not queueing it yet only because the coordinator gate is "every check completed and none failed", and those four are red for master's reason. Once the obs-slideshow-mk2.c.h:830 warning is fixed on master (noted on #2625) this needs one rebase and a fresh run — or, if you would rather land it as-is, say so and I will queue it, since mergeStateStatus is CLEAN and the red checks are unrelated to the diff.

@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Follow-up to my review, one minute later: I did queue it (--auto), so the paragraph above that says "not queueing yet" is superseded.

Reason: this repo's merge gate is PR CI and the queue (AGENTS.md), and on this head PR CI is fully green — the six red checks are all release-lane jobs (Build macos x86_64/arm64 and their two release gates, plus the two Linux release gates that inherit them), failing on master's obs-slideshow-mk2.c.h:830 warning from #2753 and not on this diff. Holding a correct two-line cast fix behind an unrelated master regression only grows the backlog. The work list also computes this PR as enqueue.

The release lane stays red until #2625's C++ replay slice fixes :830 (I put the log line and the one-line fix on #2625); this PR does not claim to fix that.

… a float (#2625)

#2753 enabled -Wfloat-conversion on the image-source target. GCC does not
flag it, so the slice was green on Linux PR CI, but AppleClang reports it
in the release lane's macOS app build:

  obs-slideshow.c.h:983 implicit conversion turns floating-point number
  into integer: 'float' to 'bool' [-Werror,-Wfloat-conversion]

  if (!ss->transition || !ss->slide_time)

'!x' on a float is 'x == 0.0f' (NaN was already false), so the comparison
is spelled out and the value tested is unchanged. Same verify-only run
40689520273 (arm64 job 122820591980) is the RED evidence.
@zackees
zackees removed this pull request from the merge queue due to a manual request Oct 28, 2026
@zackees zackees changed the title fix(text-freetype2): cast the two size_t arguments the macOS/Windows build flags (#2625) fix: repair the macOS release lane after the #2625 conversion ratchets (#2625) Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Status of the second verify-only run, 40693640460 (492f56d85, arm64 job 122835238530):

  • Both compile breaks from this PR are gone: text-freetype2.find-font+.h.c compiles (13:13:24, no diagnostic) and obs-slideshow.c.h is not reported. Windows x64/arm64 build and launch passed in the previous run on this branch.
  • The macOS app build still fails, but with no compiler diagnostic anywhere in the job log — xcodebuild exits 2 and .github/scripts/.build.zsh's TRAPZERR prints ✖︎ script execution error. right after the browser-helper signing steps. Grepping the whole job log for error:, -Werror, ❌ and ⚠️ returns nothing except a setup-soldr cache-policy line, so this is not another -Wconversion finding from the ratchets.
  • The two downstream macOS jobs (Native macOS *-DMG startup, both release-gate macOS jobs) fail from that build failure.

So I am not queuing this PR: the remaining macOS failure needs the xcodebuild output that xcbeautify --renderer github-actions dropped, and the honest next step is either a re-dispatch (if it is the signing/keychain flake it looks like) or debug: true on the lane so the raw xcodebuild stderr lands in the log. I dequeued the PR earlier to push the second fix; it is unqueued and unmerged.

Refs #2625

@zackees
zackees added this pull request to the merge queue Oct 28, 2026
Merged via the queue into master with commit 795511b Oct 28, 2026
80 of 86 checks passed
@zackees
zackees deleted the fix/text-freetype2-find-font-sign-conversion branch October 28, 2026 13:46
MCPVOT pushed a commit to MCPVOT/obs-studio that referenced this pull request Oct 30, 2026
…show (obs-rust#2625) (obs-rust#2803)

obs-rust#2753 enabled -Wconversion/-Wsign-conversion/-Wfloat-conversion on the
image-source target. obs-rust#2789 repaired the one finding that the release lane
had reached by then, in obs-slideshow.c.h, but the plugin carries a legacy
twin, obs-slideshow-mk2.c.h, which sits in the *core* unity group and has
the same guard spelled the same way:

  plugins/image-source/obs-slideshow-mk2.c.h:830:31: error: implicit
  conversion turns floating-point number into integer: 'float' to '_Bool'
  [-Werror,-Wfloat-conversion]
      if (!ss->transition || !ssd->slide_time)

GCC does not flag float-to-bool, so the slice was green on Linux PR CI;
AppleClang reports it in the macOS app build, which PR CI never runs.
Red evidence: verify-only dispatch 40699926737 (the dispatch this PR's
branch was opened from), jobs 122858738716 (macos x86_64) and
122858739020 (macos arm64), both stop at that line; the matching Linux
gate job for the same run was green.

'!x' on a float is 'x == 0.0f' (a NaN slide time was already false), so
the comparison is spelled out and the value tested is unchanged. Local
reproduction with clang -Wfloat-conversion, stubbing the two fields:

  before: error: implicit conversion turns floating-point number into
          integer: 'float' to '_Bool' [-Werror,-Wfloat-conversion]
  after:  clean

Refs obs-rust#2625
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