Skip to content

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

Description

@MaxandreOgeret

Describe the bug
Per-subproject options ("augments", e.g. -Dsub:c_args=-DFOO) never appear in introspection: neither in build/meson-info/intro-buildoptions.json nor in meson introspect --buildoptions <builddir>. The value is accepted and stored in the option store, but tooling reading introspection cannot see it.

Additionally, per-subproject rows for builtin options are gone entirely. Meson 1.2.3 emitted rows like sub:c_std, sub:warning_level, sub:werror in intro-buildoptions.json; current versions emit no sub:-prefixed builtin/compiler rows at all. The cause is that the configured-builddir path calls list_buildoptions(coredata) without the list of subprojects (mintro.py), so the per-subproject key expansion only happens in the no-builddir source introspection path. Augments are additionally never consulted: list_buildoptions() iterates optstore.items() only, never optstore.augments.

There are already disabled tests pointing at this in unittests/allplatformstests.py ("Disabled for now as the introspection format needs to change to add augments"), so part of this is deciding what augment rows should look like in the JSON.

Related: #15994 (source-only introspection ignores default_options passed to subprojects).

To Reproduce

mkdir -p repro/subprojects/sub && cd repro
cat > meson.build <<'MESON'
project('top', 'c')
subproject('sub')
MESON
cat > subprojects/sub/meson.build <<'MESON'
project('sub', 'c')
static_library('sub', 'sub.c')
MESON
echo 'int f(void){return 0;}' > subprojects/sub/sub.c
meson setup build -Dsub:c_args=-DFOO
meson introspect --buildoptions build | grep -c 'sub:'   # 0 on current master, >0 on 1.2.3
grep -c 'sub:' build/meson-info/intro-buildoptions.json  # same

Expected behavior
intro-buildoptions.json and meson introspect --buildoptions contain the per-subproject values that are in effect, e.g. a row for sub:c_args with value ['-DFOO'], and per-subproject builtin option rows as in 1.2.3.

system parameters

  • Plain native build
  • Debian GNU/Linux (forky/sid)
  • Python 3.13.14
  • meson 1.10.0, also reproduced on current master (1.12.0.rc1, 2b4f5dc); comparison rows observed on meson 1.2.3
  • ninja 1.13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions