Skip to content

Handle invalid CMake skip compiler test values - #16037

Open
LunaMeerkats wants to merge 1 commit into
mesonbuild:masterfrom
LunaMeerkats:fix-cmake-skip-compiler-test-error
Open

Handle invalid CMake skip compiler test values#16037
LunaMeerkats wants to merge 1 commit into
mesonbuild:masterfrom
LunaMeerkats:fix-cmake-skip-compiler-test-error

Conversation

@LunaMeerkats

Copy link
Copy Markdown

Summary

  • route invalid non-string cmake_skip_compiler_test values through Meson's existing configuration error
  • add a regression for the reported boolean value

Fixes #13391.

Root cause

Properties.get_cmake_skip_compiler_test() asserted that the raw property was a
string before its enum conversion. That prevented boolean input from reaching
the existing ValueError handler, so Meson exposed an internal
AssertionError instead of a normal EnvironmentException.

The documented values (always, never, and dep_only) are unchanged.

Validation

  • regression observed failing with AssertionError before the fix
  • focused regression: 1 passed
  • complete InternalTests class: 70 passed, 2 skipped
  • python run_format_tests.py
  • python -m compileall -q mesonbuild unittests/internaltests.py
  • python -m flake8 mesonbuild
  • python -m pylint mesonbuild/envconfig.py
  • valid/default enum behavior and invalid boolean/integer/list inputs checked directly

A broader Windows run completed with 478 passed and 194 skipped; its 15 failures
were in unrelated platform/toolchain cases (including C#/Rust discovery and
Windows path handling). Repository-wide Pylint and MyPy were also limited by
pre-existing Python 3.14 deprecations and POSIX-only attributes on Windows.

AI assistance

OpenAI Codex assisted with issue triage, implementation, regression coverage,
validation, and diff review. The final two-file diff and recorded test evidence
were reviewed before submission.

@LunaMeerkats
LunaMeerkats requested a review from jpakkane as a code owner July 26, 2026 01:04
@LunaMeerkats

Copy link
Copy Markdown
Author

CI follow-up: I inspected all five failed jobs before making any code changes.

  • The three MSYS2 jobs completed their unit-test phases successfully, then each failed later in the unrelated common/230 external project integration case. The same case fails in all three corresponding base-commit MSYS2 jobs.
  • The Windows unit-test phase completed with 437 passed / 246 skipped; the later project-test failures are common/216 custom target input extracted objects, native/7 selfbuilt custom, and native/8 external program shebang parsing. The base-commit Windows workflow is also red in an unrelated custom-target test.
  • The macOS job's only failure is LinuxlikeTests.test_pkgconfig_gen; the base-commit macOS workflow is likewise red in pkg-config coverage.
  • The other 25 checks passed, including format, Flake8, MyPy, Pylint, Linux, Cygwin, cross-only, and Azure jobs.

None of the failure output points to get_cmake_skip_compiler_test() or the new regression, which remains green locally. I have therefore left the patch unchanged.

@bonzini bonzini added this to the 1.11.3 milestone Jul 27, 2026
@LunaMeerkats
LunaMeerkats force-pushed the fix-cmake-skip-compiler-test-error branch from 45da956 to 891230f Compare July 27, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross file property cmake_skip_compiler_test = true causes exception

2 participants