Repository navigation
build(libobs): one source-set file per set in source-sets.d (#3235) - #3280
Merged
Merged
Conversation
…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
Member
Author
|
Local |
This was referenced Oct 31, 2026
7 tasks done
This was referenced Oct 31, 2026
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.
Refs #3235, #3232
Splits
libobs/build/source-sets.json(15 lists, 147 edits since August) intolibobs/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.pyalready reads the OS token in that name (WINDOWS / MACOS / LINUX / NIX / PULSE / WAYLAND), so no classifier change was needed: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; sharedjson_fileshelper),rust/tools/ported_sources.py(also used bytools/conversion/measure.py),ci/test_ported_sources.py,ci/test_sorted_shared_lists.py,ci/test_conversion_measure.py,validate.shmessage, 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.
./lintis ok (216 s).soldr cargo test -p obs-build --libis ok../unittestis 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.