aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
AgeCommit message (Collapse)AuthorFilesLines
2021-07-03Merge pull request #8950 from dcbaker/submit/import-required-disabledJussi Pakkanen1-16/+35
Add required and disabled to import, modules.found method
2021-07-02fix: get_variable default variables are not ObjectHolders (fixes #8936)Daniel Mensinger1-2/+2
2021-06-30interpreter: add required and disabled to importDylan Baker1-19/+40
This is useful both from the perspective of optional functionality that requires a module, and also as I continue to progress with Meson++, which will probably not implement all of the modules that Meson itself does.
2021-06-30modules: modules need to return either an ExtensionModlue or aDylan Baker1-2/+2
NewExtensionModule object So that we get the found() method.
2021-06-30interpreter: use typed_pos_args for func_importDylan Baker1-18/+16
and make the helper method private
2021-06-29Add feed arg to custom_target()Simon Ser1-1/+3
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-3/+3
2021-06-26refactor: Refactor BothLibraries logicDaniel Mensinger1-3/+2
This commit introduces a new type of `HoldableObject`: The `SecondLevelHolder`. The primary purpose of this class is to handle cases where two (or more) `HoldableObject`s are stored at the same time (with one default object). The best (and currently only) example here is the `BothLibraries` class.
2021-06-25Split compiler detection from EnvironmentDaniel Mensinger1-1/+1
This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment.
2021-06-23interpreter: Empty list used to be allowed in install_headers/manXavier Claessens1-2/+2
That change introduced when porting to @typed_pos_args breaks gtk4. We could decide to deprecate/warn but should not error for backward compatibility.
2021-06-23Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functionsJussi Pakkanen1-98/+143
Add annotations for the various install_* functions
2021-06-23Merge pull request #8912 from mensinda/fixBothLibrariesJussi Pakkanen1-3/+7
Fix `BothLibraries` processing
2021-06-22fix: Handling BothLibraries objects (fixes #8907)Daniel Mensinger1-3/+7
2021-06-22Merge pull request #8905 from mensinda/refactorFixJussi Pakkanen1-10/+7
fix: Fix set_variable not holderifying (fixes #8904)
2021-06-22install_*: FileMode doesn't need to be NoneDylan Baker1-3/+1
There's no reason to allow None into the backend, it already has code to check that all of the values of the FileMode object are None, so let's use that, which is much simpler all the way down.
2021-06-22interpreter: use typed_kwargs for install_manDylan Baker1-12/+12
2021-06-22interpreter: man sections can be up to 9 on many platformsDylan Baker1-3/+4
Linux and FreeBSD use section 9 for kernel man pages, so we should allow that.
2021-06-22interpreter: use typed_pos_args for install_manDylan Baker1-2/+5
2021-06-22interpreter: use typed_kwargs for install_headersDylan Baker1-12/+11
2021-06-22interpreter: use typed_pos_args for install_headersDylan Baker1-4/+5
2021-06-22interpreter: use typed_kwargs for install_dataDylan Baker1-25/+16
2021-06-22interpreter: use typed_pos_args for install_dataDylan Baker1-2/+4
2021-06-22interpreter: use typed_kwargs for install_subdirDylan Baker1-39/+89
2021-06-22interpreter: use typed_pos_args for install_subdirDylan Baker1-7/+3
2021-06-22interpreter: add overload for source_strings_to_filesDylan Baker1-0/+4
when only passing strings or Files we only get back Files. This is useful for the install_* methods
2021-06-21interpreter: Move argument checks from add_*_arguments to ↵Laurin-Luis Lehning1-19/+2
compiler.get_supported_arguments
2021-06-21interpreter: Consider the compiler language before checking argumentsLaurin-Luis Lehning1-1/+4
2021-06-21interprter: Add required kwarg to add_(project|global)_argumentsLaurin-Luis Lehning1-2/+16
To avoid manual compiler support checks add_project_arguments and add_global_arguments receive a new keyword argument to perform them automatically.
2021-06-20fix: Fix strange holder_map bug in combination with subprojectsDaniel Mensinger1-9/+6
I was unable to reproduce this in a minimal test-case, so there is currently no new test :(
2021-06-20fix: Fix set_variable not holderifying (fixes #8904)Daniel Mensinger1-1/+1
2021-06-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger1-91/+102
2021-06-18holders: remove unholderDaniel Mensinger1-53/+43
2021-06-18holders: Introduce BothLibrariesDaniel Mensinger1-6/+6
2021-06-18holders: Ensure that InterpreterBase is the sole instance for (un)holderifyingDaniel Mensinger1-50/+78
2021-06-18holders: Introduce HoldableObjectDaniel Mensinger1-1/+1
2021-06-18interpreter: Add FileHolder and remove specical case for FileDaniel Mensinger1-5/+5
2021-06-18interpreter: Add a new MesonInterpreterObject for non-elementary objectsDaniel Mensinger1-2/+2
2021-06-18interpreter: add type annotations to build_incdir_objectDylan Baker1-29/+30
and use textwrap.dedent to make the very large messages more readable and not break method folding.
2021-06-16interpreter: Extract dependency() logic into its own helper classXavier Claessens1-299/+19
The dependency lookup is a lot of complex code. This refactor it all into a single file/class outside of interpreter main class. This new design allows adding more fallbacks candidates in the future (e.g. using cc.find_library()) but does not yet add any extra API.
2021-06-15interpreter|build: Do Generator keyword argument checking in the interpreterDylan Baker1-3/+15
For qt we already have all of the necissary checking in place. Now in the interpreter we have the same, the intrperter does all of the checking, then passed the arguments to the Generator initializer, which just assigns the passed values. This is nice, neat, and clean and fixes the layering violatino between build and interpreter.
2021-06-15interpreter: use typed_kwargs for func_generatorDylan Baker1-2/+11
Do the type checking in a nice tidy way
2021-06-15interpreter|build: Pass just the executable down to GeneratorDylan Baker1-2/+4
This requires that the interpreter has done the validation, which it now does at all callsites. This simplifies the Generator initializer.
2021-06-15interpreter: Do not create Generator in GeneratorHolderDylan Baker1-5/+6
This is an odd pattern, not the way most Holders work, and would be problematic if a method wanted to return a Generator.
2021-06-14interpreter: use typed_*args for test and benchmarkDylan Baker1-67/+49
this also requires some changes to the Rust module, as it calls into the test code.
2021-06-14interpreter: use typed_pos_args for func_test and func_benchmarkDylan Baker1-12/+14
Requires a few small changes to the Rust module, as it calls `func_test`
2021-06-10interpreter: Add missing FeatureNewKwarg for allow_fallbackXavier Claessens1-1/+1
2021-06-08interpreter: make helper methods protectedDylan Baker1-15/+15
They really aren't meant to be called outside of the interpreter itself, so don't expose them as public
2021-06-08interpreter: Add type annotations for the add_*_arguments helpersDylan Baker1-9/+8
internally these all used a set of shared heleprs, add type annotations for those as well
2021-06-08interpreter: use typed_kwargs for the add_*_arguments familyDylan Baker1-20/+39
This makes use of the new convertor and validator arguments, so that we can check that the languages passed are in fact vaild, and then convert the native boolean into a MachineChoice internally.
2021-06-08interpreter: use typed_pos_args for add_*_argsDylan Baker1-12/+12
This just replaces stringArgs with the typed_pos_args, and it's better error message.