#15865·meson

meson introspect --dependencies no longer returns declare_dependency() deps

Author: seingierfCreated Jun 1, 2026Updated Sep 14, 2026
Labelsintrospection

Describe the bug meson introspect --dependencies silently drops any dependency created with declare_dependency() and assigned to a variable. These were previously returned with their meson_variables field populated.

To Reproduce

meson.build:
project('test', 'c')
my_dep = declare_dependency(compile_args: ['-DTEST_FLAG'])

$ meson setup builddir
$ meson introspect --dependencies builddir
[]

With meson 1.9.2:
[{"name": "dep77578412805067405965618153176944456574", "type": "internal", "version": "undefined", "compile_args": ["-DTEST_FLAG"], "link_args": [], "include_directories": [], "sources": [], "extra_files": [], "dependencies": [], "depends": [], "meson_variables": ["my_dep"]}]

bisected to commit db6b15b67

Was this intentional? The help text says "List external dependencies", but declare_dependency() objects have always been included historically.