Repository navigation
infra: Split shared registration lists into per-unit fragments - #168
Merged
Merged
Conversation
Every port appended to the same lists (rust-exports.txt, the oracle's build.rs and lib.rs, test/cmocka/CMakeLists.txt, validate.sh's object list), so concurrent port PRs conflicted on every merge. New structural checks (ci/test_registration.py) and export_list.rs now expect rust-exports.d/<crate>-<ffi module>.txt fragments, a globbed oracle, file-based oracle modules, tests.d/*.cmake test fragments and a derived Tier 2 object list. All fail on the current layout. Refs #137 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every port appended to the same lists, so each merge forced 2-4 rebases of the other open port PRs. Make each list per unit or derived: - libobs/cmake/rust-exports.txt becomes rust-exports.d/<crate>-<ffi module>.txt, one fragment per FFI module, globbed by rust.cmake. export_list.rs checks each fragment against its module's shims. - The oracle's build.rs compiles oracle/*.c (*_posix.c on Unix only) instead of listing each file, and watches libobs/ as a directory instead of a hand-kept header list. - The oracle's inline modules move to src/<name>.rs; lib.rs is a sorted list of pub mod lines. - test/cmocka/CMakeLists.txt includes tests.d/*.cmake, so a new test is a new file. - validate.sh derives the objects that must not be compiled with ENABLE_RUST_LIBOBS=ON from the CMake guards. The hand-kept list covered 8 of the 28 ported files. Behaviour-neutral: same sources, same exports OFF and ON. Refs #137 Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=474fd82a6deb1861ca6e034be2148bcbf121a3f3 secs=132 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791676558,"gate":"rust/all/fmt","host":"linux-x86_64","key":"1f368adb6145ea029f729cf70d334c9160864c703621781309a57bc6d5c0b978","lane":"lint","parents":["41de2a3de432889f723ff6e0775c14ccfb05abdc"],"secs":64,"stamp":"899225ea9f729a3c0c6e439123727a5f","tree":"474fd82a6deb1861ca6e034be2148bcbf121a3f3","v":1,"via":"run"} Ci-Attestation: {"at":1791676558,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"1f368adb6145ea029f729cf70d334c9160864c703621781309a57bc6d5c0b978","lane":"lint","parents":["41de2a3de432889f723ff6e0775c14ccfb05abdc"],"secs":64,"stamp":"8233d168913e0147e94f0eb53e3ee86a","tree":"474fd82a6deb1861ca6e034be2148bcbf121a3f3","v":1,"via":"run"} Ci-Attestation: {"at":1791676558,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"8a10a6c658cf836e786151b0d96dc451404a61d37de2435634376e16d6ca04ef","lane":"rust-test","parents":["41de2a3de432889f723ff6e0775c14ccfb05abdc"],"secs":31,"stamp":"4e4abccc614a18300d26e5ac7f399b97","tree":"474fd82a6deb1861ca6e034be2148bcbf121a3f3","v":1,"via":"run"} Ci-Attestation: {"at":1791676558,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ad38322f01e9037c0652eb6ee9191734df8d97e23c15ce02397fa89298d88c61","lane":"tier2-linux","parents":["41de2a3de432889f723ff6e0775c14ccfb05abdc"],"secs":37,"stamp":"11ac3941c411fdbe14ac5868abe34570","tree":"474fd82a6deb1861ca6e034be2148bcbf121a3f3","v":1,"via":"run"}
This was referenced Oct 11, 2026
chriscoveries
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 11, 2026
Follows obs-rust#168: one fragment per test in test/cmocka/tests.d/ instead of an appended block in CMakeLists.txt, so concurrent test additions do not conflict. The ASan flags are preserved.
chriscoveries
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 11, 2026
Follows obs-rust#168: one fragment per test in test/cmocka/tests.d/ instead of an appended block in CMakeLists.txt. The ASan flags are preserved.
zackees
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 11, 2026
Follows obs-rust#168: one fragment per test in test/cmocka/tests.d/ instead of an appended block in CMakeLists.txt. The ASan flags are preserved.
zackees
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 11, 2026
Follows obs-rust#168: one fragment per test in test/cmocka/tests.d/ instead of an appended block in CMakeLists.txt, so concurrent test additions do not conflict. The ASan flags are preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #137
Every port appended to the same handful of lists, so each merge forced 2–4 rebases of the other open port PRs (#59, #76, #77, #78 this week). Shared
endif()placement intest/cmocka/CMakeLists.txtalso broke CMake nesting twice. This PR makes each list per-unit or derived.RED:
test: RED checks that shared registration lists are split per unitci/test_registration.pystructural checks. All 5 fail on master:.cfiles are globbed, not listed;lib.rsis a sortedpub modlist;test/cmockaincludestests.d/*.cmake;validate.shhas no hand-kept object list;rust-exports.d/replacesrust-exports.txt.rust/obs-util/tests/export_list.rsnow reads fragments, and addsrust_exports_are_one_fragment_per_ffi_module: each FFI module with exported shims owns exactly one<crate>-<module>.txtlisting exactly those shims. All 3 tests fail on master.GREEN:
infra: Split shared registration lists into per-unit fragmentslibobs/cmake/rust-exports.txt(173 lines)rust-exports.d/<crate>-<ffi module>.txt: 26 fragments, globbed byrust.cmakefor Windows/EXPORT, with a READMEbuild.rs: one.file()per wrapper, plus ~80 hand-listed headersoracle/*.c(*_posix.con Unix only) and watcheslibobs/as a directorylib.rs: 22 inline modules, 996 linessrc/<name>.rsper module;lib.rsis 30 sortedpub modlinestest/cmocka/CMakeLists.txtappended per testtest/cmocka/tests.d/<test>.cmake, globbed (existing blocks untouched), with a READMEvalidate.sh: hand-kept list of 8 objects that must not compile with Rust ONENABLE_RUST_LIBOBSguards: 28 objects, matched underlibobs.dir/The derived list closes a coverage gap: the old list checked 8 of the 28 ported files. Matching under
libobs.dir/was needed because libobs also linksdeps/libcaption/src/utf8.c, which has the same file name asutil/utf8.c.Evidence
ci/test_registration.py5/5 OK;export_list3/3 OK./EXPORTpath from the fragments is covered by this PR's Windows Rust Tests and Tier 2 jobs.Behaviour-neutral: same sources, same exports.
Note for open port PRs (#120, #121): add a fragment rather than editing
rust-exports.txtor appending totest/cmocka/CMakeLists.txt.