Skip to content

mintro: include per-subproject options in buildoptions introspection - #15995

Open
MaxandreOgeret wants to merge 1 commit into
mesonbuild:masterfrom
MaxandreOgeret:fix-introspect-augments
Open

mintro: include per-subproject options in buildoptions introspection#15995
MaxandreOgeret wants to merge 1 commit into
mesonbuild:masterfrom
MaxandreOgeret:fix-introspect-augments

Conversation

@MaxandreOgeret

@MaxandreOgeret MaxandreOgeret commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #15993.

Per-subproject options never show up in meson introspect --buildoptions or intro-buildoptions.json for a configured build dir. Two reasons: the configured path called the option listing without the set of subprojects, so the per-subproject replication of non-yielding builtins only ran for source-only introspection (a regression - 1.2.3 emitted sub:c_std, sub:warning_level, ...); and augments were never consulted, so a value like -Dsub:c_args=-DFOO was invisible and replicated rows showed the parent project's value.

Fix: pass coredata.initialized_subprojects on the configured path, emit rows for base/compiler options that have an augment set (that adds the sub:c_args row), and resolve per-subproject keys through the option store so augments and yielding are reflected in the reported value. Project options keep their stored value, so the user section is unchanged.

Added a test covering the augment rows, the intro-file/command consistency, and the source-only path. I looked at re-enabling DISABLED_test_introspect_buildoptions_without_configured_build, but its fixture (58 introspect buildoptions) is deliberately unconfigurable (missing source file, bogus language), so source-vs-configured parity still can't be asserted there.

I deliberately did not fix : coredata.initialized_subprojects is append-only across reconfigures, so a subproject removed from the build keeps its rows until a wipe. The option store already behaves the same way for that subproject's project options.

@MaxandreOgeret
MaxandreOgeret requested a review from jpakkane as a code owner July 9, 2026 00:30
@bonzini bonzini added this to the 1.11.3 milestone Jul 9, 2026
The configured-builddir path called the option listing without the set
of subprojects, so the per-subproject replication of non-yielding
builtin options only happened for source-only introspection and no
sub: rows were emitted at all. Augments (per-subproject values such as
-Dsub:c_args=...) were additionally never consulted, so even the
source-only rows reported the parent project's value.

Pass coredata.initialized_subprojects on the configured path, add
per-subproject rows for base and compiler options that have an augment
set, and resolve replicated keys through the option store so augments
and yielding are reflected in the reported value. Project options keep
their stored value as before.

Fixes mesonbuild#15993.
@MaxandreOgeret
MaxandreOgeret force-pushed the fix-introspect-augments branch from 6072be4 to 2eeeb65 Compare July 9, 2026 07:04
@bonzini

bonzini commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Can you remove the release node snippet, since this will be handled as a regression and backported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

introspection options Meson configuration options regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-subproject options (augments) missing from buildoptions introspection; per-subproject builtin rows regressed vs 1.2.3

2 participants