Commit Graph

90 Commits

Author SHA1 Message Date
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
Daniel Mensinger 02734cc5c3
Better documentation 2019-01-06 12:19:31 +01:00
Daniel Mensinger c33df1fd73
Revert to old behavior 2019-01-06 12:19:31 +01:00
Daniel Mensinger 3588786138
Some small fixes 2019-01-06 12:19:31 +01:00
Daniel Mensinger 84948ea6cd
Renamed `--force-new` to `--force-dict-output` 2019-01-06 12:19:31 +01:00
Daniel Mensinger 2e81631d0c
Keep 'filename' and 'install_filename' as strings 2019-01-06 12:19:31 +01:00
Daniel Mensinger 7691b0460c
Ninja backend target introspection 2019-01-06 12:19:30 +01:00
Daniel Mensinger d4ac832bf6
Split the monolithic introspection file into chunks 2019-01-06 12:19:29 +01:00
Daniel Mensinger b11df88395
Documentation and unit test update 2019-01-06 12:19:29 +01:00
Daniel Mensinger b034f52656
Filenames are now lists 2019-01-06 12:19:29 +01:00
Daniel Mensinger b91c5aad85
Update intro dump on meson configure 2019-01-06 12:19:29 +01:00
Daniel Mensinger 24d668bea0
Removed determine_installed_path since it is no longer needed 2019-01-06 12:19:28 +01:00
Daniel Mensinger 4addd176db
Removed fallback detection logic 2019-01-06 12:19:28 +01:00
Daniel Mensinger a5be893b19
Some code cleanup 2019-01-06 12:19:28 +01:00
Daniel Mensinger 74274e23ca
Moved the source and compiler generation to the backend 2019-01-06 12:19:28 +01:00
Daniel Mensinger 71d17b44e4
Fixed list_target_files and list_targets 2019-01-06 12:19:28 +01:00
Daniel Mensinger a0d478da39
More refactoring 2019-01-06 12:19:27 +01:00
Daniel Mensinger 98eb7a48ab
Added unit test 2019-01-06 12:19:27 +01:00
Daniel Mensinger b2854e9edc
Fixed rebase error 2019-01-06 12:19:27 +01:00
Daniel Mensinger 111e596200
Fixed tests and benchmarks 2019-01-06 12:19:27 +01:00
Daniel Mensinger f4285f350e
Initial automatic target file generation 2019-01-06 12:19:27 +01:00
Daniel Mensinger a6034d1f19
Added option to force use the new format 2019-01-06 12:15:10 +01:00
Daniel Mensinger 8288555aa1
mintro: Added option to introspect multiple parameters at once 2019-01-06 12:15:10 +01:00
Daniel Mensinger 1a0e1afbdd
Updated format to include sources 2019-01-06 12:15:10 +01:00
mensinda 9d13855544
Fixed hardcode is_cross = False 2019-01-06 12:15:10 +01:00
Daniel Mensinger 0a12594847
Added include_directories and extra_args keys to target introspection 2019-01-06 12:15:04 +01:00
Daniel Mensinger 64372d5cfc
Do not require build dir for introspection 2018-12-29 23:55:45 +01:00
Daniel Mensinger 6864ed60dd mintro: Bug fix for determine_installed_path for multiple target outputs 2018-12-20 23:03:55 +02:00
Daniel Schulte f954eee906 Remove name property from introspect --projectinfo as it is not used 2018-11-26 23:12:00 +01:00
Daniel Schulte 0e62193730 mintro: Allow introspect --projectinfo without build directory.
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.
2018-11-26 23:12:00 +01:00
Daniel Schulte bdc9f6846c mintro: Split list_buildsystem_files into generation and command function 2018-11-26 23:10:53 +01:00
Daniel Mensinger 1759fc8f45
Sorted arrays alphabetically 2018-11-24 10:57:22 +01:00