Commit Graph

121 Commits

Author SHA1 Message Date
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Paolo Bonzini 3778a34979 mintro: include test protocol in introspection data 2019-12-13 00:47:10 +02:00
Daniel Mensinger fc800a2cb8 mintro: Add version key to --scan-dependencies (fixes #6287) 2019-12-10 20:17:21 +02:00
Daniel Mensinger 7065a697e3 types: Add type annotations to mintro.py 2019-12-07 21:34:30 +02:00
Daniel Mensinger e4a0ee205d lgtm: Fix redundant code 2019-12-05 00:22:10 +02:00
Daniel Mensinger c361181cd9
mintro: dependencies: added version key 2019-11-14 18:16:47 +01:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Aaron Plattner b626978dc6 Add missing newlines to "meson introspect" error
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-10-18 00:48:00 +03:00
Peter Hutterer 4ebce2c3f2 Add test priorities to force test start order 2019-08-24 21:26:41 +03:00
Daniel Mensinger 3b3f53ab55 mintro: Fix section key in buildoptions
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-17 19:20:33 +03:00
Daniel Mensinger 54b1c43277 mintro: Add installed subdirs introspection (fixes #5556) 2019-07-01 11:28:54 -07:00
John Ericson af2d7af998 Per machine do 'build.' and '' option prefixes
See the docs/ changes for details.
2019-06-05 23:05:34 -04:00
Paolo Bonzini 9491878681 meson-introspect: do not include host environment in test/benchmark 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-28 20:18:10 +03:00
Dylan Baker 146e97e974 Use dependency cache 2019-05-20 10:05:36 -07:00
John Ericson 4030e7cb7a UserOption no longer has a name field.
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-05-15 14:21:47 +03:00
Daniel Mensinger 3581839f4c
Fix unused variables warnings 2019-04-29 12:22:50 +02:00
Daniel Mensinger 2b5831f94f
Fix flake8-bugbear warnings 2019-04-29 12:22:50 +02:00
Dylan Baker 5678468c2c Don't use len() to test for container emptiness
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-25 12:28:51 -07:00
Daniel Mensinger d72d98d3af mintro: removed deprecated --target-files API 2019-04-08 21:06:15 +03:00
Daniel Mensinger 7074f12644
mintro: Renamed --dependencies --> --scan-dependencies 2019-03-03 23:19:04 +01:00
Daniel Mensinger 185dc8c2e5
mintro: Fix unit test 2019-03-03 23:19:04 +01:00
Daniel Mensinger f9da03fb7b
mintro: Address code review 2019-03-03 23:19:03 +01:00
Daniel Mensinger f9b41d5ecb
mintro: Dependencies from source 2019-03-03 23:19:03 +01:00
Daniel Mensinger 8a1411a1e8
Target introspection from source 2019-03-03 23:19:03 +01:00
Daniel Mensinger 98e60f59ac
Minor introspection refactoring 2019-03-03 23:19:03 +01:00
Daniel Schulte f0b0bcf86d mintro: Add subproject_dir to --projectinfo 2019-03-01 23:40:33 +02:00
Daniel Schulte 924cf5e622 mintro: Add name of subproject the target is contained in to --target output 2019-03-01 22:29:52 +02:00
Jussi Pakkanen a32f31fdfa
Merge pull request #4826 from mensinda/confDefOpts
mconf: Use introspection to print the project default options (fixes #2543)
2019-02-12 20:00:34 +02:00
Daniel Mensinger 71d174bcbe
Fixed some code issues 2019-02-05 11:18:57 +01:00
John Ericson 19f81d3e33 Never access environment.properties downstream
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-02-02 13:59:14 -05:00
Daniel Mensinger 750af9c853
Moved the introspection interpreter 2019-01-22 16:09:34 +01:00
Daniel Mensinger ccad493e85
Basic AST visitor pattern 2019-01-22 16:09:34 +01:00
Daniel Mensinger af38722f89 mintro: Introspection interpreter refactoring (#4733)
* 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-16 23:42:54 +02:00
Daniel Mensinger 609ecba37f mintro: Added `defined_in` key in the targets introspection 2019-01-15 20:28:12 +02:00
Daniel Mensinger 96f354ebde
Load source dir from meson-info.json 2019-01-13 19:04:57 +01:00
Daniel Mensinger 243eca6cee
mintro: Check meson-info.json version instead of loading coredata 2019-01-13 19:01:38 +01:00
Jussi Pakkanen 49557e15ec
Merge pull request #4731 from mensinda/introBreak2
mintro: Changes to the introspection API
2019-01-13 19:50:10 +02:00
John Ericson 913c87b327 `environment.cross_info.need_cross_compiler()` doesn't exist
It is no longer needed either.
2019-01-10 23:02:23 +02:00
Daniel Mensinger 5c139032b8
Deprecated --target-files API 2019-01-07 22:35:56 +01:00
Daniel Mensinger a1d8c1d3e9
Changed introspection target format 2019-01-07 22:24:49 +01:00
Daniel Mensinger b82cbbdd4c
Fixed missing newline 2019-01-06 22:20:15 +01:00
Daniel Mensinger ab32f1fe00 Added meson-info.json 2019-01-06 22:03:29 +01:00
Daniel Mensinger 38241f5fce Introspection refactoring 2019-01-06 22:03:21 +01:00
Daniel Mensinger bcb8146280
Indent flag only toggles 2019-01-06 12:19:35 +01:00
Daniel Mensinger aa6e3dc470
Fixed flake8 issues 2019-01-06 12:19:34 +01:00
Daniel Mensinger 9c214f4a70
Fixed buildoptions form source 2019-01-06 12:19:34 +01:00
Daniel Mensinger 25618c6a4d
Atomic write 2019-01-06 12:19:34 +01:00
Daniel Mensinger bd8bad46c3
Code cleanup and renamed variables 2019-01-06 12:19:33 +01:00
Daniel Mensinger 63e16fbcc3
Fixed flake8 2019-01-06 12:19:32 +01:00
Daniel Mensinger e1719c5d37
Load coredata 2019-01-06 12:19:32 +01:00