aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mintro.py
AgeCommit message (Collapse)AuthorFilesLines
2020-09-04introspect: add test dependencies info to test/benchmark JSONPaolo Bonzini1-0/+1
Add the ids of any target that needs to be rebuilt before running the tests as computed by the backend, to the introspection data for tests and benchmarks. This also includes anything that appears on the test's command line. Without this information, IDEs must update the entire build before running any test. They can now instead selectively build the test executable itself and anything that is needed to run it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-01mconf/mintro: use authoritative list of options from coredataDylan Baker1-13/+1
This splits the directory options and non-directory options into two dicts, and then merges them later to maintain API.
2020-06-12mintro: typings again x2TheQwertiest1-1/+1
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-06-12mintro: more typing shenanigansTheQwertiest1-1/+1
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: enforced order for subcommandsTheQwertiest1-12/+14
2020-06-09Made --help options sortedTheQwertiest1-1/+1
2020-05-23ast: Add AST JSON printerDaniel Mensinger1-1/+7
2020-04-30Convert test protocol into an enumDylan Baker1-1/+1
This gives us better type safety, and will be important as we add more test methods
2020-04-20Compiler options per langJohn Ericson1-2/+9
A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
2020-03-08intro: List symlinks in installdata (fixes #6734)Daniel Mensinger1-3/+8
2020-03-02types: Annotate mparser.pyDaniel Mensinger1-2/+3
This also fixes that the keys in ArgumentNode.kwargs are all of the type BaseNode now. Before this commit, it was possible that both strings and Nodes where used as keys.
2020-02-06Make 'default_library' per-subproject builtin optionXavier Claessens1-2/+13
Currently it's just like if all builtin/base/compiler options are yielding. This patch makes possible to have non-yielding builtin options. The value in is overriden in this order: - Value from parent project - Value from subproject's default_options if set - Value from subproject() default_options if set - Value from command line if set
2020-01-28mintro: use interpreter data for buildsystem-files (fixes #6390)Daniel Mensinger1-13/+15
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-44/+44
2019-12-13mintro: include test protocol in introspection dataPaolo Bonzini1-0/+1
2019-12-10mintro: Add version key to --scan-dependencies (fixes #6287)Daniel Mensinger1-1/+8
2019-12-07types: Add type annotations to mintro.pyDaniel Mensinger1-120/+93
2019-12-05lgtm: Fix redundant codeDaniel Mensinger1-1/+0
2019-11-14mintro: dependencies: added version keyDaniel Mensinger1-0/+1
2019-11-06Fix typos found by codespellWolfgang Stöggl1-1/+1
- Typos were found by codespell v1.16.0
2019-10-18Add missing newlines to "meson introspect" errorAaron Plattner1-3/+3
The lack of newlines in the print() statement for this error causes the result to be jumbled and hard to read: $ ./meson.py introspect Current directory is not a meson build directory.Please specify a valid build dir or change the working directory to it.It is also possible that the build directory was generated with an oldmeson version. Please regenerate it in this case. Add newlines so the message is more readable: $ ./meson.py introspect Current directory is not a meson build directory. Please specify a valid build dir or change the working directory to it. It is also possible that the build directory was generated with an old meson version. Please regenerate it in this case.
2019-08-24Add test priorities to force test start orderPeter Hutterer1-0/+1
2019-07-17mintro: Fix section key in buildoptionsDaniel Mensinger1-6/+8
This reverts the changes to the `section` key for the buildoptions and moves the machine choice into it's own `machine` key. With this commit the __undocumented__ breaking change to the introspection format (introduced in 0.51.0) is reverted and a new key is added instead.
2019-07-01mintro: Add installed subdirs introspection (fixes #5556)Daniel Mensinger1-0/+2
2019-06-05Per machine do 'build.' and '' option prefixesJohn Ericson1-2/+12
See the docs/ changes for details.
2019-05-28meson-introspect: do not include host environment in test/benchmark ↵Paolo Bonzini1-1/+1
introspection The host environment could change between the time "meson setup" produces intro-tests.json, and the time "meson test" is run. Including it only adds clutter to the introspection data. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-20Use dependency cacheDylan Baker1-1/+1
2019-05-15UserOption no longer has a name field.John Ericson1-2/+2
This avoids the duplication where the option is stored in a dict at its name, and also contains its own name. In general, the maxim in programming is things shouldn't know their own name, so removed the name field just leaving the option's position in the dictionary as its name.
2019-04-29Fix unused variables warningsDaniel Mensinger1-3/+3
2019-04-29Fix flake8-bugbear warningsDaniel Mensinger1-1/+1
2019-04-25Don't use len() to test for container emptinessDylan Baker1-2/+2
I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
2019-04-08mintro: removed deprecated --target-files APIDaniel Mensinger1-32/+0
2019-03-03mintro: Renamed --dependencies --> --scan-dependenciesDaniel Mensinger1-0/+11
2019-03-03mintro: Fix unit testDaniel Mensinger1-0/+1
2019-03-03mintro: Address code reviewDaniel Mensinger1-3/+7
2019-03-03mintro: Dependencies from sourceDaniel Mensinger1-2/+9
2019-03-03Target introspection from sourceDaniel Mensinger1-1/+42
2019-03-03Minor introspection refactoringDaniel Mensinger1-40/+40
2019-03-01mintro: Add subproject_dir to --projectinfoDaniel Schulte1-1/+3
2019-03-01mintro: Add name of subproject the target is contained in to --target outputDaniel Schulte1-1/+2
2019-02-12Merge pull request #4826 from mensinda/confDefOptsJussi Pakkanen1-1/+1
mconf: Use introspection to print the project default options (fixes #2543)
2019-02-05Fixed some code issuesDaniel Mensinger1-1/+1
2019-02-02Never access environment.properties downstreamJohn Ericson1-1/+2
Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
2019-01-22Moved the introspection interpreterDaniel Mensinger1-108/+1
2019-01-22Basic AST visitor patternDaniel Mensinger1-16/+2
2019-01-16mintro: Introspection interpreter refactoring (#4733)Daniel Mensinger1-103/+41
* Fixed spelling * Merged the Buildoptions and Projectinfo interpreter * Moved detect_compilers to Environment * Added removed test case * Split detect_compilers and moved even more code into Environment * Moved set_default_options to coredata * Small code simplification in mintro.run * Move cmd_line_options back to `environment` We don't actually wish to persist something this unstructured, so we shouldn't make it a field on `coredata`. It would also be data denormalization since the information we already store in coredata depends on the CLI args.
2019-01-15mintro: Added `defined_in` key in the targets introspectionDaniel Mensinger1-0/+2
2019-01-13Load source dir from meson-info.jsonDaniel Mensinger1-4/+5