Skip to content

build: keep the shared per-port lists sorted, one entry per line - #2010

Merged
zackees merged 2 commits into
masterfrom
fix/1997-sorted-shared-lists
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/1997-sorted-shared-lists

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Refs #1997 (part 3; part 2, per-unit fragments, stays open).

Ports that append at the end of the same list collide at the same hunk and get ejected from the merge queue. These lists are now sorted, so each new entry lands at its own place, and a ci test keeps them sorted.

Sorted (order is not semantic, checked consumer by consumer):

  • test/cmocka/build/test-graph.json targets and tests. obs-build deserializes both into BTreeMaps, so it already ran them sorted. CMake (native-test-graph.cmake) defines each target on its own, and no target references another graph target. No generator writes this file. json.dumps(indent=2) round-trips it byte for byte.
  • libobs/build/source-sets.json, every *_PORTED_SOURCES list. Each entry is a unity group with its own translation unit, all C or a single ObjC group, with no constructors in libobs. LIBOBS_SOURCES and the host *_SOURCES lists are not per-port appends, so they keep upstream order.
  • rust/obs-c-oracle/benches/port_comparison.rs, the <unit>::benchmarks(criterion); calls. The mod lines were already sorted. Each unit's benchmarks stand alone, with no shared startup or shutdown.
  • ci/test_ported_sources.py. The per-port assertIn runs became sorted tables (PORTED_ON_EVERY_HOST, PORTED_ON_LINUX, NOT_PORTED), checked by a loop. Every assertion is kept: 18 objects on linux, windows and macos, 3 on linux, and 7 not ported. Host and feature special cases stay as they were.

Skipped: rust/README.md. Its table is a grouped crate overview, not a per-port append list.

RED c78bc4b: new ci/test_sorted_shared_lists.py, picked up automatically by the ci/test_*.py glob. It failed with 3 failures and 1 error: test-graph, source-sets and benchmark calls were unsorted, and the tables did not exist yet.
GREEN fd2c2e6 passes:

  • the sorted-lists test, test_ported_sources, test_cmocka_mbedtls_graph, test_cmocka_windows_diagnostics, test_rust_scope, test_tier2_concurrency and test_perf_guard_lint;
  • the 10 native_build::native_test_graph* tests (soldr cargo test -p obs-studio-rust --test obs-tests-app);
  • soldr cargo bench -p obs-c-oracle --bench port_comparison --no-run;
  • ./lint.

No user-visible change, so no features.md line.

@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 113e4b6 Oct 24, 2026
31 checks passed
@zackees
zackees deleted the fix/1997-sorted-shared-lists branch October 26, 2026 15:43
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.

1 participant