Skip to content

build: stop parallel ports from colliding in shared registration files and pinned test counts #1997

Closed

Description

@zackees

On 2026-10-23 most merge-queue ejections and manual rebases came from a handful of files that every port appends to, plus the test counts that are still pinned:

#1929 alone needed five rebases in one day.

Proposal (maintainer-approved follow-up):

  1. Unpin the remaining suite counts the way test: stop pinning the core cmocka test count in the obs-build graph contract (#1908) #1910 did for core: assert coverage and structure, not an exact number.
  2. Give each port its own file where a list is shared, the way the export fragments work: one port_comparison/<unit>.rs discovered by a build script or macro instead of a hand-written mod list; a per-unit fragment for source sets and the ported-sources test; generated or per-file entries in test-graph.json.
  3. Where a single file must stay, keep entries sorted and one per line, so independent additions don't touch the same hunk.

Open for a worker to claim.

Activity

  1. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    Claiming: #1997 part 1 (unpin the remaining suite counts in native_test_graph_replaces_legacy_utility_definitions). Parts 2 and 3 (per-unit fragments, sorted one-per-line lists) stay open for someone else, or for me after this PR lands.

  2. added
    claimed
    on Oct 23, 2026
  3. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    Part 1 is #2001 (queued).

    A note on part 2 for port_comparison.rs before anyone builds it: a build-script-generated mod list is the obvious route, but it is expensive. obs-c-oracle/build.rs also compiles the whole C oracle. Watching benches/port_comparison/ with rerun-if-changed would rerun all of it on every bench edit. Touching one oracle file just now cost 152 s (soldr cargo bench -p obs-c-oracle --bench port_comparison --no-run, 135 cache misses). The generator needs a package of its own, or the list stays hand-written but sorted one per line (part 3). I'm not claiming part 2.

  4. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    Claiming: #1997 part 3 (sorted, one entry per line). Today test-graph.json's tests/targets maps (177 each) and the benchmarks() calls in port_comparison.rs are unsorted, so every port appends at the same spot. Plan, one PR: RED a ci test that requires these shared lists (test-graph.json maps, port_comparison.rs mod lines and calls, source-sets.json ported list, rust/README.md port rows if tabular) to be sorted with one entry per line; GREEN sort them, after checking that no consumer depends on their order. Part 2 stays unclaimed.

  5. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    Claiming: #1997 part 3 (keep the shared per-port lists sorted, one entry per line, with a ci test that enforces it). Part 2 stays open.

  6. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    #2001 merged (part 1). Part 3 for test-graph.json is #2011: both maps sorted by name, enforced by ci/test_test_graph_sorted.py (it has a --fix mode). source-sets.json and the other lists are still open.

  7. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Part 3 merged in #2010: test-graph.json targets/tests, source-sets.json *_PORTED_SOURCES and port_comparison.rs benchmarks() are sorted one per line, enforced by ci/test_sorted_shared_lists.py. Part 2 (per-unit fragments) is still open.

  8. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Two more shared files that keep conflicting, between the platform-facade PRs this time (#1980, #1993, #2050 on 2026-10-23/24): ci/platform-ifdef-baseline.json (the ratchet baseline every facade PR shrinks) and cmake/cross/CMakeLists.txt.

  9. moved this from In progress to Triage in obs-rust Multiviewon Oct 25, 2026
  10. 6 remaining items

  11. moved this from In progress to Ready in obs-rust Multiviewon Oct 26, 2026
  12. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Claiming: part 2, first slice (per-unit source registration to reduce port PR conflicts). 1. Inspect the current source-set consumers and choose a format that preserves their checks. 2. Add a failing fixture for two independent units. 3. Implement fragment discovery and validate locally. I expect the first PR today; remaining shared lists stay for follow-ups.

  13. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Part 2, second slice: #2554. benches/port_comparison.rs no longer carries a hand-kept unit list — build.rs generates the #[path] mod lines and the run_units() call list from the directory, so a port adds one file and edits nothing shared. That closes the shared-list item from the first note (#1922 vs #1928, #1929 vs #1922).

    Still open after #2552 and #2554:

    • test/cmocka/build/test-graph.json per-unit entries. Both consumers are in-repo (rust/obs-build Graph::load, test/cmocka/native-test-graph.cmake, and five ci/test_* readers), so fragments are a bigger change than the source-set slice; worth doing only if the graph keeps conflicting.
    • cmake/cross/CMakeLists.txt per-component files, which needs ci/ci_scope.py and ci/test_cross_sources.py rewritten. Still deferred unless the facade series restarts.
  14. moved this from Ready to In progress in obs-rust Multiviewon Oct 27, 2026
  15. removed their assignment
    on Oct 28, 2026
  16. moved this from In progress to Ready in obs-rust Multiviewon Oct 28, 2026
  17. zackees commented on Oct 29, 2026

    @zackees
    MemberAuthor

    Closing: every part of the proposal landed, verified on origin/master (c2c340167).

    Proposal Landed as Evidence in the tree
    1. Unpin the remaining suite counts #2001 rust/obs-build/tests/native.rs:1334 asserts coverage and structure for core, graphics, vlc, webrtc, qt ("No suite's size is pinned"), no exact count.
    2. Per-unit files for shared lists (source sets) #2552 libobs/build/ported-source-sets/*.json fragments, discovered by libobs/cmake/sources.cmake; LIBOBS_PORTED_SOURCES is now generated build output, and ci/test_ported_sources.py requires the fragments.
    2. Per-unit files (port_comparison) #2554 rust/obs-c-oracle/build.rs generates the #[path] mod lines and run_units() list from benches/port_comparison/; benches/port_comparison.rs carries no hand-kept unit list.
    3. Keep single-file lists sorted, one entry per line #2010, #2011 test/cmocka/build/test-graph.json, source-sets.json *_PORTED_SOURCES and port_comparison.rs are sorted one per line, enforced by ci/test_sorted_shared_lists.py and ci/test_test_graph_sorted.py (with --fix).

    The two extra files noted on 2026-10-24 were re-checked on 10-26 and need nothing (ci/platform-ifdef-baseline.json is already one per line, sorted by --update).

    No work remains here; the collision surface this issue listed is closed. If a new shared file starts colliding, that is a fresh report.

  18. added a commit that references this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions