Commit Graph

24 Commits

Author SHA1 Message Date
Dylan Baker 822b087f24 interpreter: use find_program_impl internally instead of func_find_program
Calling interpreter implementation methods is just a bad idea, apart
from the extra type checking that goes into it, we need to pass more
arguments than we need to calling the impl method.
2021-11-22 11:28:43 -08:00
Paolo Bonzini 9a8c2d23f1 interpreter: disallow RunTarget in meson.add_install_script
Without this patch, the name of the RunTarget is passed to the
install script; for the enclosed test, meson setup (incorrectly)
succeeds, but installation fails.
2021-11-15 11:33:00 +01:00
rusty-snake 44b4fc914e Typo fixes (CustomTaget -> CustomTarget) 2021-10-30 14:29:17 -04:00
Xavier Claessens 3902bd4ef1 Fix add_install_script() ignoring install_tag
Fixes: #9454
2021-10-27 20:49:28 -04:00
Christian Clauss a5020857f3 Fix typos discovered by codespell 2021-10-10 16:12:25 -04:00
Eli Schwartz 4ab70c5512
fix extra whitespace
discovered via flake8 --select E303
2021-10-04 16:29:31 -04:00
Daniel Mensinger d93d01b6c5 interpreter: Introduce StringHolder
Another commit in my quest to rid InterpreterBase from all higher
level object processing logic.

Additionally, there is a a logic change here, since `str.join` now
uses varargs and can now accept more than one argument (and supports
list flattening).
2021-09-25 12:44:11 +02:00
Dylan Baker 5a69dbe0cb interpreter/mesonmain: remove unreachable code
Now that we have type checking, we can be sure that this code is
unreachable, and remove it.
2021-09-24 10:36:05 -07:00
Dylan Baker 92b21a0045 interpreter/mesonmain: Fix remaining typing problems and add to run_mypy 2021-09-24 10:36:05 -07:00
Dylan Baker d661a0cd96 build: use an object rather than a dict for the dep_manifest
This really is more of a struct than a dict, as the types are disjoint
and they are internally handled, (ie, not from user input). This cleans
some things up, in addition I spotted a bug in the ModuleState where the
dict with the version and license is passed to a field that expects just
the version string.
2021-09-24 10:36:05 -07:00
Dylan Baker 6c5bfd4c24 interpreter/mesonmain: Add full set of typed_argument guards 2021-09-24 09:48:47 -07:00
Dylan Baker 27fd7b14e7 interpreter/mesonmain: fix type annotations
Taht should have been converted to build/program module objects, not
interpterter objects
2021-09-24 09:47:38 -07:00
Dylan Baker 3731e1d8f3 make EnvironmentVariablesObject a proper holder
Currently, EnvironmentVariablesObject is a strange
holder-that's-not-a-holder. This has implicaitons for things that expect
to get an EnvironmentVariables object, as we can't automatically
unholder it, and instead have to to manually do so. Now we can
automatically unholder it, which makes everything much nicer.
2021-08-30 18:05:02 -07:00
Xavier Claessens ab773ff9e8 Simplify condition in can_run_host_binaries() 2021-08-30 14:00:54 -04:00
Dylan Baker 11fbaf29d8 interpreter: fix cases of `KwargInfo(..., T, default=None)`
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
2021-08-27 14:54:29 -07:00
Xavier Claessens e646130ef1 interpreter: Fix dependency(..., static: true) fallback
It should build the fallback subprject with default_library=static and
override the dependency for both static=True and static kwarg not given.

Fixes: #8050.
2021-08-23 10:52:18 -04:00
Xavier Claessens 8c5aa031b5 Add install tags
Fixes: #7007.
2021-08-17 15:19:18 -04:00
Xavier Claessens 0183954ea1 Fix meson.version().version_compare() regression in subproject 2021-07-21 13:33:06 -04:00
Eli Schwartz dd31891c1f more f-strings too complex to be caught by pyupgrade 2021-07-05 17:55:04 +03:00
Daniel Mensinger 7c757dff71 holders: Fix the remaining code to respect the holder changes 2021-06-18 23:48:33 +02:00
Daniel Mensinger 34c28dc92c holders: remove unholder 2021-06-18 23:48:33 +02:00
Daniel Mensinger 63ade7d937 interpreter: Add a new MesonInterpreterObject for non-elementary objects 2021-06-18 23:48:33 +02:00
Xavier Claessens 5440ce003b Add global_source/build_root() 2021-04-09 09:29:12 -07:00
Xavier Claessens 558a7bc6ff interpreter: Move to its own folder and split it 2021-04-01 14:26:33 -04:00