Repository navigation
fix: repair the macOS release lane after the #2625 conversion ratchets (#2625) - #2789
Conversation
…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
left a comment
There was a problem hiding this comment.
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()takesize_t, so the implicit conversion happened inside the call before this change.countcomes from the cached list andface->num_fixed_sizesfrom FreeType; both are non-negative at those call sites, so the cast is a widening, not a truncation. No product behaviour changes and nodocs/features.mdline 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.cat 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-conversionerrors 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]atif (!ss->transition || !ssd->slide_time)(slide_timeisfloat, declared at:95). This file is untouched by the PR and reaches the warning from theimage-sourceconversion slice (#2753) — it is the C++ replay case #2625 lists as still to come. I reproduced the diagnostic in C++ mode locally withclang 21.1.8on a minimal!floatand confirmed the C-mode replay ofimage-source.core+.h.cis 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.
|
Follow-up to my review, one minute later: I did queue it ( 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 ( The release lane stays red until #2625's C++ replay slice fixes |
… 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.
|
Status of the second verify-only run, 40693640460 (
So I am not queuing this PR: the remaining macOS failure needs the xcodebuild output that Refs #2625 |
…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
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:
plugins/text-freetype2/CMakeLists.txtputsbuild/text-freetype2.find-font+.h.c(which includesfind-font.c.h) only in the windows+ and macos+ unity groups; Linux buildsfind-font-unix.c.hinstead, so no Linux lane ever compiles those two lines.GREEN
c5f292f60:(size_t)countand(size_t)face->num_fixed_sizesat the call sites. The implicit conversion happened insideda_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-validateimage → the same two diagnostics; after the casts, neither is reported (the only remaining error is a-Wshadowfrom the temporary double include offind-font.c.hon Linux, which the real groups do not do).2.
image-source(from #2753)RED: verify-only run 40689520273, macOS x86_64/arm64 app builds:
GCC does not flag a float in boolean context, so the Linux slices and PR CI stayed green; AppleClang does.
GREEN
492f56d85:!ss->slide_timeis written asss->slide_time == 0.0f, which is what!computed (a NaN was already false). Same value tested, no conversion.Verification
./lintclean on both commits.Build windows x64/arm64,Release gate Windows x64/arm64,Launch packaged Windows x64/arm64all success.gh workflow run release-rust.yaml --ref fix/text-freetype2-find-font-sign-conversion -f verify_only=trueis dispatched against492f56d85. 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