Repository navigation
build: preserve native C++ language standards in the shared test graph - #1844
Conversation
|
GREEN pushed as Local evidence: six focused graph contracts, Clippy and full lint pass; 300 native core/graphics executions against both cores pass with zero skips, all 158 canonical targets compile via CMake, and all 150 CMake core/graphics cases pass with zero skips/failures. Exact runtime case names match the current graph. Three indirect PCH watches were added afterward as scheduling metadata and covered by focused contracts/lint. Same single primary review is clean. Holding the branch unchanged for PR CI, then the normal merge queue; next implementation follows after this PR lands. No admin merge. CMake remains authoritative and #1332 stays open. |
|
Pushed fixture-only fix The exact strict-C89 RED reproduces the issue; corrected strict C89 and the actual mixed-language contract pass locally. Formatting and the same primary review pass. Current-head CI will verify Windows. Holding implementation unchanged for the normal merge gate. |
|
Pushed The existing safe-write parity case now uses |
|
Native Windows confirmation on Log retained at |
|
Current-head PR CI passed on Windows passed both new C++ contracts, the isolated safe-write parity case, all 699 utility tests and Clippy. Native Windows compatibility passed four runs of 189 cases each; macOS passed four runs of 214 each. Rust/macOS and cross-platform lint passed. These component checks use existing CMake-compiled compatibility executables; they are not complete Cargo application proof. Marked ready and entered the normal merge queue at position 4. Holding this head unchanged for merged-result validation. No admin merge. #1849 awaits landing; #1332 remains open and CMake remains authoritative. |
Summary
Refs #1332. Fixes #1849. Add typed ISO C++17/C++20 settings to the shared native model and its Cargo/cc::Build and CMake consumers. Apply the setting only to C++/Objective-C++ compilation; C retains its own mode. CMake requires the requested standard and disables extensions, matching OBS's compiler configuration.
Migrate six unchanged Qt-free C++ tests to the graph: disk-space monitor, scene-collection migration, crash-sentinel directory, settings migration, output-start logging and unclean launch. Preserve original source order, includes, libraries (including Threads for disk-space), commands and platform availability. Track frontend utility headers and the three indirect PCH headers under
frontend/build/.Current graph: 158 definitions: 138 core, 12 graphics, 6 VLC, 2 WHIP. A literal scan still finds 218 independent executable declarations; loops and other directories also need migration. No existing C/C++ test or public header changes, new test binary, workflow file or worktree.
RED → GREEN
bafc7a9b3: actual mixed C/C++20 executable contract fails with unknown graph fieldcpp_standard.6b6ed3a0dtightens the extension-property assertion after review, rejecting unset values as well as extensions being enabled. The fixture's C++20 constructs and ISO-mode check require actual compiler support; C remains independently compiled and linked.8420b1a95: helper-inventory contract fails with missing canonicaltest_disk_space_monitor.3c0fb41f8: indirect-input contract fails because the disk-space PCH path is absent from watches.36ad39446: typed standard support, six migrations and exact PCH input watches make all six focused graph contracts pass. Both parsers reject numeric, empty, unknown and boolean standard values.Validation
libobs-integrationand./lintpass. Same single primary review clean; its extension-assertion finding was fixed.Evidence:
/tmp/obs-1332-cpp-standard-{red,green}.log,/tmp/obs-1332-cpp-helpers-red.log,/tmp/obs-1332-cpp-pch-watch-red.log,/tmp/obs-1332-cpp-standards-{contracts-green,clippy,lint}.log,/tmp/obs-1332-cpp-native-validation.log, independently checked/tmp/obs-1332-cpp-evidence-summary.json.Hosted Windows fixture correction —
d7966e46dWindows Rust job
120153013224on36ad39446exposed an unintended C11 requirement in the new generated fixture: MSVC's unchanged default C mode rejects_Static_assert. The compiler argv and stack confirm the failure occurs inanswer.c, before C++ compilation. Existing production/native tests are unaffected.A strict-C89 syntax check reproduces the failure locally.
d7966e46dreplaces the fixture assertion with a portable typedef array bound, retaining the__cplusplusguard, integer-width assertion, ISO C++20 constructs and both consumer checks. Strict C89, the actual mixed-language contract, formatting and the same primary review pass. Logs:/tmp/obs-1332-cpp-c-mode-{red,green,contract-green,fmt}.log; hosted failure:/tmp/obs-1332-cpp-ci-windows-rust-failure.log. Current-head Windows CI remains required; the earlier full lint/runtime evidence covers the unchanged implementation.Windows parity isolation blocker —
23049778aOn
d7966e46d, Windows job120156380454passed both new C++ contracts, including actual mixed C/C++20 compilation/execution. A separate utility test then failed:safe_write_matches_the_c_file, with existing target /tmpextension / no backup / no marker, C true and Rust false. Utility suite: 698 passed, one failed. Stack and logs are retained in/tmp/obs-1332-cpp-ci-windows-d796-failure.log.Investigation found that this replacement test ran directly alongside process-spawning tests, contrary to the testing policy's explicit Windows inherited-C-stdio-handle isolation requirement. #1849 records the observed failure and diagnosis limits.
23049778awraps this existing test in the repository's exact-selector child helper. Its entire 64-case oracle/file-content matrix is unchanged; no retries, skips, production behavior changes, public headers or new binary.The existing parity case passes locally through the child helper; Clippy, formatting and the same primary review pass. Evidence:
/tmp/obs-1332-safe-write-isolation-{green,clippy,fmt}.log. Current-head Windows CI remains required. Full native build/runtime evidence above still covers the unchanged implementation.Remaining scope
Local native execution above is Linux evidence. Current-head PR CI and the normal merge queue remain required. The full issue still needs the remaining C++/Qt/scripting/generated-input model, non-Linux Cargo test/application orchestration, complete configuration/cache evidence and packaged saved-profile validation. CMake remains authoritative; this PR does not complete #1332.