This variant was added to allow introspection before configuring a build directory. This is useful for IDE integration to allow displaying and/or setting options for the initial configuration of the build directory. It also allows showing basic information about the project even if it's not yet configured or configuring failed. The project 'name' field in --projectinfo is used inconsistently: For the top level project it always shows the name configured in the top level meson.build file. For subprojects it's referring to the name of the directory the subproject's meson.build is contained in. To have a consistent output and preserve the existing behavior this adds the 'descriptive_name' field which always shows the name set in the project. To be consistent the 'descriptive_name' field was also added to the --projectfiles variant that uses an already configured build. It also extends the information shown with the list of buildsystem-files. This is currently only implemented in the variant for unconfigured projects.pull/4191/head
parent
8c9c5199f9
commit
0e62193730
3 changed files with 140 additions and 2 deletions
@ -0,0 +1,35 @@ |
||||
## `introspect --projectinfo` can now be used without configured build directory |
||||
|
||||
This allows IDE integration to get information about the project before the user has configured a build directory. |
||||
|
||||
Before you could use `meson.py introspect --projectinfo build-directory`. |
||||
Now you also can use `meson.py introspect --projectinfo project-dir/meson.build`. |
||||
|
||||
The output is similiar to the output with a build directory but additionally also includes information from `introspect --buildsystem-files`. |
||||
|
||||
For example `meson.py introspect --projectinfo test\ cases/common/47\ subproject\ options/meson.build` |
||||
This outputs (pretty printed for readability): |
||||
``` |
||||
{ |
||||
"buildsystem_files": [ |
||||
"meson_options.txt", |
||||
"meson.build" |
||||
], |
||||
"name": "suboptions", |
||||
"version": null, |
||||
"descriptive_name": "suboptions", |
||||
"subprojects": [ |
||||
{ |
||||
"buildsystem_files": [ |
||||
"subprojects/subproject/meson_options.txt", |
||||
"subprojects/subproject/meson.build" |
||||
], |
||||
"name": "subproject", |
||||
"version": "undefined", |
||||
"descriptive_name": "subproject" |
||||
} |
||||
] |
||||
} |
||||
``` |
||||
|
||||
Both usages now include a new `descriptive_name` property which always shows the name set in the project. |
Loading…
Reference in new issue