Repository navigation
obs-util: port cf-parser (#1466) - #1467
Conversation
Preserve pair cursor movement and diagnostic source positions, sequential substitutions, null/empty storage, and bmalloc ownership. Keep the preprocessor, C tests and public headers unchanged. Local: 1432 native Rust tests and 4 doctests pass; 175 C tests pass in each macOS mode, with one optional SVT-AV1 skip per mode. Export sets match (1877 symbols). Workspace Clippy, rustfmt and Dylint pass. Cursor mutation is detected by differential parity. Linux Docker validation is still in progress; no full local-gate attestation.
|
Full CI remains a readiness prerequisite. This PR changes unity-group membership; BUILD.md requires full Windows and macOS builds for such changes, in addition to scoped PR checks. The user also requested all possible CI, including local Linux Docker, before marking ready. The GREEN head is Local Linux Docker Tier 2 is still running. Native macOS Rust and C OFF/ON results are recorded in the PR description. Local Windows cross-checks are blocked by this host/toolchain's missing SDK support. |
|
Validation update for GREEN
The PR remains draft per the requested readiness gate. Remaining blockers are the two shared local Linux failures and the full Windows/macOS application workflow, which needs a maintainer dispatch because this account receives HTTP 403. The PR description has the complete validation details. |
) The release gate's cross lint runs clippy -D warnings on aarch64-unknown-linux-gnu, where wchar_t is u32 and c_char is u8, so `as u32` / `as u8` on them are no-ops there and clippy's unnecessary_cast fails the release. They are needed on x86-64 Linux and macOS (i32 / i8), which is why the PR gate passes. Keep the casts and allow the lint with a comment where the type depends on the target, as ffi/dstr.rs and platform/unix/nix.rs already do: File::open_wide and mbs_to_utf8 in platform/unix/file.rs, and ffi/cf_parser.rs (from obs-rust#1467). Fixes obs-rust#1484
Refs #1466.
Ports
cf_pass_pairandcf_adderrorfromlibobs/util/cf-parser.c.htoobs-util. The safe core preserves delimiter traversal and the post-call token position, diagnostic source locations, sequential substitutions, and null-versus-empty diagnostic storage. The C adapter preserves the public layouts, filename pointers and bmalloc-owned error messages. The preprocessor, public headers, and existing C tests stay unchanged. No intentional behavior differences.Existing characterization is
test_cf_lexer; no separate characterization commit was necessary. Added Rust tests mirror its exported-function behavior, compare every field offset of the parser/preprocessor layouts, check allocation balance in an isolated child, and compare randomized calls to a separately named original-C oracle. Temporarily omitting advancement past a closing delimiter makes the differential test fail; the mutation was restored.RED → GREEN
dba6269e0: the three new core tests fail attodo!()(0 passed, 3 failed); pushed as an early draft.d8a2b274c8809269d2b2fa932bc29c944b4bb038: eight focused tests pass; full native workspace has 1,432 passing tests, one pre-existing ignored test, and four passing doctests.Validation
-D warnings, rustfmt, Dylint, test-binary inventory, platform ratchet and performance guards pass. macOS CI-tooling self-tests have host-dependent failures; all 127 test files pass in Linux across the full run and a writable-temp-copy rerun of two scratch-writing tests.cmake/cross/docker.sh win-x64passes after initializing the pinned libdshowcapture submodule. Workspace Windows MSVC Clippy, Dylint, and compilation/linking of all Windows test binaries also pass. LLVM'sllvm-libentry point was exposed locally via a symlink tollvm-ar;CARGO_TARGET_DIRwas placed on the writable build volume. These are cross-build checks; Windows runtime tests passed in hosted CI.test_cf_lexerpasses in both. Debug configuration selects the release-profile Rust static library. The required-no-skip policy checks pass.Readiness blockers
This PR remains draft. Local Linux
test_group_empty_bounds(drag_into_filled_group) andtest_scene_dup_group_children(private_copy_keeps_group_state) fail against both original C and Rust-backed libraries, including serial reruns. The initial C-onlytest_group_hide_transition_audiofailure passed on its serial rerun and on both Rust-backed runs.Full Windows and macOS application builds are also required by BUILD.md for unity-group changes. Upstream workflow dispatch returned HTTP 403, "Must have admin rights to Repository"; a maintainer must arrange that run on this exact head. Skipped full-build jobs are not treated as passes. No local-gate stamp is claimed.
Tier 4 is not applicable to these utility exports; no user-visible behavior change or feature-ledger entry.
AI assistance: Codex implemented and tested this port.