Skip to content

build(libobs): one source-set file per set in source-sets.d (#3235) - #3280

Merged
zackees merged 2 commits into
masterfrom
build/3235-source-set-fragments
Oct 31, 2026
Merged

zackees merged 2 commits into
masterfrom
build/3235-source-set-fragments

Conversation

@zackees

@zackees zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member

Refs #3235, #3232

Splits libobs/build/source-sets.json (15 lists, 147 edits since August) into libobs/build/source-sets.d/<SET>.json, one JSON list per set. Content and order are unchanged: the union of the fragments was compared to the old dict locally and is identical.

Layout choice. Each file is named after its set (LIBOBS_WINDOWS_PORTED_SOURCES.json). ci/platform_paths.py already reads the OS token in that name (WINDOWS / MACOS / LINUX / NIX / PULSE / WAYLAND), so no classifier change was needed:

  • Windows-set file: core + Windows, no Linux Tier 2
  • macOS-set file: core + macOS
  • shared / HEVC / Linux sets: core + Linux Tier 2, as before

I did not split any finer. New ports already register through ported-source-sets/<unit>.json, so the remaining edits to LIBOBS_SOURCES / LIBOBS_PORTED_SOURCES are removals and inserts of one line each in sorted, one-entry-per-line files. Git merges those cleanly unless the edits are adjacent. Splitting per unity group would add a second registry for little gain.

Consumers changed: libobs/cmake/sources.cmake (CONFIGURE_DEPENDS glob plus each file as a configure dependency; the port-fragment set check now uses the set-name list), rust/obs-build/src/libobs.rs (rerun-if-changed on the dir and each file; shared json_files helper), rust/tools/ported_sources.py (also used by tools/conversion/measure.py), ci/test_ported_sources.py, ci/test_sorted_shared_lists.py, ci/test_conversion_measure.py, validate.sh message, and the docs (BUILD.md, ci_scope docstring, testing-policy, hybrid-build, cc-build). cmake/cross reads the sets through sources.cmake.

RED 80b6c78: ci/test_libobs_source_set_fragments.py, 2 failures + 1 error (the monolithic file exists, source-sets.d is missing, the loader finds no fragments). The ci_scope-selection case passes already, because selection is path-only.
GREEN 4e4e9d0: that test plus test_sorted_shared_lists, test_ported_sources, test_conversion_measure, test_ci_scope and test_build_groups all pass. ./lint is ok (216 s). soldr cargo test -p obs-build --lib is ok. ./unittest is still running cold; I'll post its result as a comment.

Tiers: this is a build-layout change with no behavior change, so Tier 1/3/4 don't apply. Tier 2 is covered by PR CI, since libobs/ selects it.

Follow-ups (not migrated, they use their own single files): frontend/build/source-sets.json, plugins/obs-nvenc/build/source-sets.json, plugins/mac-capture/source-sets.json, shared/qt/wrappers/source-sets.json, cmake/graphics-source-sets.json.

Fails: source-sets.json still exists, source-sets.d/ is missing, the
loader returns nothing for the fragments.

Refs #3235, #3232
…REEN

Split libobs/build/source-sets.json into libobs/build/source-sets.d/<SET>.json,
one JSON list per set with content and order unchanged. A port now edits only
the lists it touches, and the set name in the file name (WINDOWS, MACOS,
LINUX, NIX, PULSE, WAYLAND) lets ci/platform_paths.py select the host's CI
lanes for a host-set edit; shared sets select what libobs/ always did.

Readers: libobs/cmake/sources.cmake (CONFIGURE_DEPENDS glob plus each file),
rust/obs-build libobs.rs (rerun-if-changed on the dir and each file),
rust/tools/ported_sources.py (Tier 2 inventory, tools/conversion/measure.py),
and the ci/ tests and docs.

Refs #3235, #3232
@zackees

zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

Local ./unittest (cold) hit the 40 min timeout during the Tier 2 ctest run. Rust Tiers 1-3 and the Tier 2 CMake configure and build went through with the new source-sets.d layout. 913 ctest results passed (the hybrid run, then the second run reached 274/652), with no failures before the timeout. PR CI decides the merge.

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