Repository navigation
rust: port effect parser lifecycle to obs-graphics - #1650
Conversation
fd1b43a to
4c5da5c
Compare
|
Rebased onto master Before this update, reran native workspace tests (1,947 passed / one ignored), workspace Clippy/Dylint, x64 linking, native C lifecycle suites against both libraries, and both complete 351-test Linux Docker modes. Both lifecycle suites pass in both modes; exported symbols match; skip-policy checks pass. Each full Docker mode retains the same two scene/group failures and three PulseAudio skips documented in the description. No local-gate attestation is claimed. Keeping the PR draft until current-head CI passes. |
…bs-rust#1685) * ci: Check that cmocka tests link libobs_rust-static only behind a guard test_effect_parser_lifecycle_rust (from obs-rust#1650) links libobs_rust-static unconditionally. That target exists only with OBS_LIBOBS_BACKEND=HYBRID, so a C-backend build with unit tests fails to link it ("cannot find -llibobs_rust-static"). CI builds no C backend with unit tests, so nothing there notices. This static check does: every tests.d/*.cmake line that names the Rust static library must be inside an if(TARGET libobs_rust-static) block, as test_preflight_abi already is. It fails on master for test_effect_parser_lifecycle.cmake:25. Refs obs-rust#1683 * test: Build the Rust effect parser test only with the Rust staticlib obs-rust#1650 added test_effect_parser_lifecycle_rust, which runs the effect parser lifecycle assertions against the production Rust staticlib and links libobs_rust-static. With OBS_LIBOBS_BACKEND=C there is no such target, so the C-lane test build failed to link it. Build and register that variant only if(TARGET libobs_rust-static), as test_preflight_abi does. The C variant, test_effect_parser_lifecycle, still builds and runs in both lanes, and the hybrid lane builds and runs both, as before. Fixes obs-rust#1683
Fixes #1644. Characterization prerequisite: #1646 (merged).
What and why
Move
ep_freecleanup traversal and destruction order into the safe Rustobs-graphicscore, preserving its hidden C ABI. A thin layout adapter delegates the existing header-inline element destructors, parser-state cleanup, and array release to private C helpers. Borrowed pointers and the existing retained files/tokens arrays keep their original behavior.The unchanged C characterization runs against both the original C source and the production Rust staticlib. Differential tests check randomized owned graphs, repeated cleanup, allocation balance, and every parent layout offset in the existing graphics test binary. The oracle extracts both cleanup bodies verbatim after their native PCH and supplies only the unit headers, avoiding an unrelated zlib requirement on Windows Rust runners. The original C cleanup remains in the C-reference build. No public headers or existing C tests changed; no intentional behavior differences.
RED → GREEN
2658eb3de(unchanged RED patch from28fef089bafter rebase) — all nine lifecycle Rust tests fail at thetodo!()stub, locally and in PR CI. Eight mirror the C characterization; one pins destruction order.4c5da5c12, with oracle portability fix51f9f6e00— all 11 focused Rust lifecycle/layout/differential tests pass. A mutation that skips parameter destruction fails the differential check at seed 1, confirming it detects leaked ownership.test_group_empty_bounds(drag_into_filled_group) andtest_scene_dup_group_children(private_copy_keeps_group_state) fail with both C-reference and hybrid libraries and reproduce on a serial C-reference retry. An earlier VLC timing failure passed on retry and both final rebased runs. The three skips require PulseAudio fixtures; the mandatory skip-policy check passes for both modes. These broad-suite failures are outside the ported cleanup path; the local gate is not claimed green.Local validation boundaries: Linux ARM64 GCC blocks full Rust tests/Clippy in unchanged
dstr-libc.c.h:120,129(wchar_tsign conversion); Linux Python self-tests, formatters, inventory, and ratchets pass. After installing LLVM in the task container, the complete Windows MSVC/macOS ARM64 cross lane passes locally (Clippy, Dylint, and linking every test binary for both targets). Managed Windows GNU remains unsupported on ARM64 hosts. x64 macOS Dylint cannot load its nightlystd/coreeven after reinstalling that target. No local-gate attestation is claimed; hosted CI must run the full selected suite.Checklist
masterrust/README.md: noneCurrent-head CI passed on
51f9f6e00b6d65a9a2b3aeee44ba0d1e4e3c87c9: Fast Gate, formatting, cross-lint, Windows/macOS Rust tests, Linux OFF/ON Tier 2 shards, Windows/macOS Tier 2, and CI Gate. Ready for review; not merged.