meson
meson copied to clipboard
Introspection data does not include `generator` inputs
Describe the bug
meson-info/intro-targets.json has no reference to input files used in generator.process.
To Reproduce
// main.h
#include <stdio.h>
int main() { puts("hello world"); }
# meson.build
project('example', 'c')
cp = generator(find_program('cp'),
arguments : [ '@INPUT@', '@OUTPUT@' ],
output : '@[email protected]'
)
executable('example', cp.process('main.h'))
meson setup build
meson introspect build --targets | jq .[0].target_sources
[
{
"language": "c",
"compiler": [
"cc"
],
"parameters": [
"-I/home/elliot/example/build/example.p",
"-I/home/elliot/example/build",
"-I/home/elliot/example",
"-fdiagnostics-color=always",
"-D_FILE_OFFSET_BITS=64",
"-Wall",
"-Winvalid-pch",
"-O0",
"-g"
],
"sources": [],
"generated_sources": [
"/home/elliot/example/build/example.p/main.h.c"
]
}
]
Expected behavior
the output of sh meson introspect build --targets | jq .[0].target_sources contains mention of main.h as an input/source
system parameters
- meson 1.5.0
I just checked what happens with custom_targets, and they have the same behavior, so I think this might be "working as expected"?
"working as expected"
oof, perhaps a new field to track generator inputs per target could be added to the introspection data?
Yeah, I think that's perfectly reasonable.