Repository navigation
build(obs-scripting): Exempt the Lua SWIG sources from -Wpedantic (#2711) - #2712
Merged
Merged
Conversation
The exemption landed only in python.cmake, so a configuration with ENABLE_SCRIPTING_PYTHON=OFF (the AppImage build) compiles the Lua SWIG glue with -Wpedantic again. Fails on master: test_each_generated_swig_target_opts_out_of_pedantic test_the_lua_sources_are_exempt_even_with_python_off
The pedantic exemption for obs-scripting sat in cmake/python.cmake, inside if(ENABLE_SCRIPTING_PYTHON). The AppImage build configures with -DENABLE_SCRIPTING_PYTHON=OFF and still compiles the Lua SWIG runtime into the same target, so -Wpedantic (#2623) applied to generated glue again. Carry the diagnostic opt-out beside its #516/#2703 siblings in lua.cmake.
zackees
commented
Oct 27, 2026
zackees
left a comment
Member
Author
There was a problem hiding this comment.
Coordinator review (head 1c98cef33). I reproduced both sides myself rather than reading the body only.
What I verified
- Facts in the body, checked on master
6ae5bc10f:build-aux/appimage/build.py:77really does pass-DENABLE_SCRIPTING_PYTHON=OFF, and-Wpedanticis in both global C lists (cmake/common/compiler_common.cmake:72,cmake/linux/compilerconfig.cmake:69), so with Python off nothing exempted the Lua SWIG glue. The diagnosis holds. - RED, reproduced: in a worktree at the PR head,
git checkout origin/master -- shared/obs-scripting/cmake/lua.cmakethenuv run python -m unittest ci/test_scripting_pedantic_exemption.py→FAILED (failures=2), includingcmake/lua.cmake must carry -Wno-pedantic for obs-scripting. - GREEN, reproduced: same command on the PR head →
Ran 4 tests … OK. - Formatting:
uvx gersemi==0.25.0 -c shared/obs-scripting/cmake/lua.cmakeis clean, so the lint lane will not reject the moved flag list. - Placement:
-Wno-pedanticsits inside theCOMPILE_LANG_AND_ID:C,…genex beside-Wno-cast-qual/-Wno-missing-prototypes/-Wno-strict-prototypes, which is exactly the shape the #516/#2695/#2703 exemptions already use — C-only, target-scoped, never a global-Wno-*.
Notes, none blocking
test_the_lua_sources_are_exempt_even_with_python_offrestates what the widenedtest_each_generated_swig_target_opts_out_of_pedanticloop already asserts forlua.cmake. It is harmless and the failure message names the reason, so I would keep it — just be aware it is a second pin on one fact, not new coverage.- Your scope note is right and worth keeping in the body: the AppImage lane sets
CMAKE_COMPILE_WARNING_AS_ERROR=OFF(build.py:66-67), so today this restores the intended silence rather than fixing a red. I do not want an AppImage dispatch spent on it — the config change is provable by reading the two option lists, which the test now pins.
No docs/features.md line is correct: build configuration only, nothing a user can observe. No ci.toml change, so the GEN-005 baseline is untouched.
Approved from the coordinator side. I will queue it once Fast Gate ⚡ and Rust Tier 2 Linux 🐧 (build) finish on this head.
Member
Author
|
Handed off to the coordinator.
|
zackees
added a commit
that referenced
this pull request
Oct 28, 2026
GREEN: check_buffer, the four SIMD repack functions and the two scalar fallbacks are reached only through audio_repack_init's repack_func slot in this unity group, so they are file-scope private. audio_repack_init and audio_repack_free keep their prototypes in audio-repack.h. This clears the next -Wmissing-prototypes failure the Flatpak app lane hits after #2710 and #2712: the lane compiles past the audio repack unit instead of stopping there.
This was referenced Oct 28, 2026
Closed
MCPVOT
pushed a commit
to MCPVOT/obs-studio
that referenced
this pull request
Oct 30, 2026
…2703) (obs-rust#2717) * ci: Pin that the aja audio-repack helpers are static (obs-rust#2703) RED: ci/test_aja_missing_prototypes.py fails on master with seven file-scope definitions in plugins/aja/audio-repack.c.h that are neither static nor declared in the plugin's headers. The Flatpak app build is the only lane that compiles them and it stops at audio-repack.c.h:5: error: no previous prototype for 'check_buffer' [-Werror=missing-prototypes] * fix(aja): Make the audio-repack helpers static (obs-rust#2703) GREEN: check_buffer, the four SIMD repack functions and the two scalar fallbacks are reached only through audio_repack_init's repack_func slot in this unity group, so they are file-scope private. audio_repack_init and audio_repack_free keep their prototypes in audio-repack.h. This clears the next -Wmissing-prototypes failure the Flatpak app lane hits after obs-rust#2710 and obs-rust#2712: the lane compiles past the audio repack unit instead of stopping there. * ci: Pin the linux-jack process callback as static (obs-rust#2703) RED: ci/test_linux_jack_missing_prototypes.py fails on master with plugins/linux-jack/jack-wrapper.c.h:56: jack_process_callback a file-scope definition that is neither static nor declared in a header. The Flatpak app build is the only lane that compiles the JACK plugin and it stops there with -Werror=missing-prototypes. * fix(linux-jack): Make the process callback static (obs-rust#2703) GREEN: jack_process_callback is the jack_set_process_callback argument used only by jack_init in the same translation unit, so it is file-scope private. jack_init and deactivate_jack keep the prototypes jack-wrapper.h declares. * style(aja): clang-format the static shuffle_8ch signature (obs-rust#2703) The added `static` pushed the declaration past 120 columns; clang-format 22.1.3 rewraps it the way ./lint --fix does.
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.
Fixes #2711.
-Wno-pedanticfor the SWIG-generated scripting sources landed only inshared/obs-scripting/cmake/python.cmake, insideif(ENABLE_SCRIPTING_PYTHON). The Lua SWIG runtime is compiled into the sameobs-scriptingtarget fromcmake/lua.cmake, so with Python on the exemption covers it by accident; with Python off it does not apply at all. The AppImage build is that configuration (build-aux/appimage/build.py:77,-DENABLE_SCRIPTING_PYTHON=OFF), and-Wpedantic(#2623) then applies to generated glue again.RED
eda2d2d39—ci/test_scripting_pedantic_exemption.pynow reads every file that compiles SWIG code into a target instead of one file per target, and addstest_the_lua_sources_are_exempt_even_with_python_off. Onf0bb6aabf:GREEN
1c98cef33—-Wno-pedanticadded to the C-onlyCOMPILE_LANG_AND_IDgenex incmake/lua.cmake, beside the#516and#2703diagnostics for the same generated files, with the reason recorded in the comment.Why the flag belongs in both files
The
obs-scriptingtarget compiles the Lua glue with or without Python; the exemption is per diagnostic for generated code, not per option.python.cmakekeeps its copy (that target still haspy_error(), which uses__FUNCTION__), andlua.cmakenow carries its own so neither configuration depends on the other.Scope and verification
CI/configuration fix, so RED and GREEN are pushed together (coordination.md §4) with local evidence above. No user-visible change: no
docs/features.mdline.The diagnostic text is from the app lanes (
build/obs-scripting,obs-scripting-lua.h:200,obs-scripting-lua-source.c.h:110/:71,obs-scripting-lua-frontend.c.h:21/:23), reproduced pre-#2696 in run 40594533995 job 122507234793. Not proven by a full AppImage build here: that lane setsCMAKE_COMPILE_WARNING_AS_ERROR=OFF(build.py:66-67), so today the effect is warning output rather than a failure — the flag restores the intended exemption and keeps the build correct if that lane, or any other withENABLE_SCRIPTING_PYTHON=OFF, ever compiles with warnings as errors. Say so if you want an AppImage dispatch on the branch as well.