Skip to content

obs-core: Type the weak-object parity counts as c_long - #4961

Merged
zackees merged 1 commit into
masterfrom
fix/4960-weak-refs-windows-clippy
Nov 17, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/4960-weak-refs-windows-clippy

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #4960

Master's native Windows clippy step has failed since the weak-object reference port (#4951) merged: the proptest in rust/obs-core/tests/obs_core/weak_object_refs_parity.rs generated i32 counts and passed them as refs.into(), weak.into(). Windows c_long is i32, so both conversions trip clippy::useless_conversion under -D warnings; Linux and macOS (64-bit c_long) need them, so host lint passed. The same error rejects every merge group that runs the Windows lane.

The fix generates the counts from two c_long ranges (REFS = -2..32, WEAK = 0..16), so no target needs a conversion. Bounds, case count and assertions are unchanged; test-only, no C or header changes, no new executable.

RED → GREEN

Command (Linux host, Windows target):
soldr cargo clippy -p obs-data --test obs-tests-core --locked --target x86_64-pc-windows-msvc -- -D warnings

  • RED on origin/master 3ea35fc19: exit 101, error: useless conversion to the same type: i32 twice at weak_object_refs_parity.rs:153, could not compile obs-data (test "obs-tests-core") due to 2 previous errors. Same error as master run 44032243959.
  • GREEN on this branch: exit 0.

Also: soldr cargo test -p obs-data --test obs-tests-core --locked weak_object_refs → 7 passed, 0 failed; ./lint → ok.

🤖 Generated with Claude Code

The proptest generated i32 counts and converted them with .into(). On
Windows c_long is i32, so clippy's useless_conversion failed the native
Windows clippy step on master and in every merge group. Generate the
counts as c_long ranges instead; bounds and cases are unchanged.

Fixes #4960

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1794906433,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":53,"stamp":"dee262b137bce9d90321d298f26eac4c","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906433,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":53,"stamp":"b110252267480c5ac698c62858e6c03c","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906433,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":53,"stamp":"b47214fc0c2d3426c46292996fae505d","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906433,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":53,"stamp":"e6247339819e30ce3d0199c6895f799c","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"general/all/client-lint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"93d27020ff8725e34208f9cc99d0a1e7","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906433,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":53,"stamp":"83a06d77ce09657a1b3b750801599ae5","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"3d6d3a9f18591c00befa00cff0561fe4","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"e5133f6f03129a51d8d4437c7747922f","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"f4a7cbd4290bc62f937d6faea952ed56","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"8790ac587219315a3ab0d75f4e22e1d2","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"9e2f2f3885220299d6bfd88dcdee0283","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"46e08dbffb1ff3a0b5a53ad476629667","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"c2a669d074d8981d9352c0e481f41756","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"53b16a91c5c97ebea00d7ba2934f1441","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"0b66b5f163c1f8f53774b792e1397051","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"e6c8cf0424ce5b146a541a1fdaae1043","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"207fb4c852ab150ee2a047a22ce592c7","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906379,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"4def430940717de7100a45fa21b725911330bc94a21e86c7fe4eebdbc4973574","lane":"client-lint","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":66,"stamp":"de9e4b81855e676bec8a75852be3d170","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}
Ci-Attestation: {"at":1794906635,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"b0c2abf930716eadaa82ebb6ab5d4dc15f1c179a5423e43bb2633a2a24cac1a1","lane":"client-test-x86_64-unknown-linux-gnu","parents":["3ea35fc19440a41d82a83791e325baaf8b36ed7f"],"secs":202,"stamp":"e125aadbcf57ff3a76e95e941c4e7fc6","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"3ea35fc19440a41d82a83791e325baaf8b36ed7f","coverage":"all-tracked-applicable-files","diff":["rust/obs-core/tests/obs_core/weak_object_refs_parity.rs"],"head":"ae126b9c8087778d004cd953ef7fadb0d155c6fc","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"282768c293ca6597618502f15d067fcd9bb28d3a268009e38d1915205f875509","tree":"1b0ab86ecac01b94f5da15f4114c347fb5c6bdb9"}}
@rdoupe
rdoupe marked this pull request as ready for review November 17, 2026 09:11
@rdoupe
rdoupe requested a review from zackees as a code owner November 17, 2026 09:11
@rdoupe
rdoupe enabled auto-merge November 17, 2026 09:11
@rdoupe
rdoupe added this pull request to the merge queue Nov 17, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 17, 2026
@zackees
zackees added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit 68956c9 Nov 17, 2026
42 checks passed
@zackees
zackees deleted the fix/4960-weak-refs-windows-clippy branch November 17, 2026 10:58
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Nov 17, 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.

bug: obs-core: weak-object parity conversions break Windows clippy after #4951

2 participants