aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter
AgeCommit message (Collapse)AuthorFilesLines
2021-10-30Added warning if run_command is called without the check kwargVolker Weißmann1-1/+9
2021-10-30Typo fixes (CustomTaget -> CustomTarget)rusty-snake1-1/+1
2021-10-30Typo fixes (CustomTaget -> CustomTarget)rusty-snake1-1/+1
2021-10-29Merge pull request #9375 from dcbaker/submit/windows-module-typingJussi Pakkanen1-1/+8
Typing for the Windows module
2021-10-28configure_file: upgrade deprecation message to FeatureDeprecatedEli Schwartz1-2/+2
install: false was only available since 0.50, so we should not warn people who support older versions to use something they cannot. Fortunately, we can do FeatureDeprecated for this -- and then it even gets summarized. Unfortunately, it's not well used, and certainly isn't here.
2021-10-27Fix add_install_script() ignoring install_tagXavier Claessens1-0/+1
Fixes: #9454
2021-10-27fix various flake8 whitespace errorsEli Schwartz3-5/+3
2021-10-26interpreter: Revert old path joining behavior (fixes #9450)Daniel Mensinger1-1/+2
2021-10-26message: Allow boolXavier Claessens1-2/+2
It has always been working even if not documented and there is no reason to not accept it. However, change "True/False" to "true/false" to be consistent with meson language. Fixes: #9436
2021-10-26dep.name(): return dependency name even if dependency is not foundThomas Heijligen1-1/+1
The dep.name() function schould always return the name of the dependency as documented. No matter if it was found or not. https://mesonbuild.com/Reference-manual_returned_dep.html#depfound
2021-10-24interpreter: Fix missing featuer check (fixes #9425)Daniel Mensinger1-0/+4
2021-10-15wrap: move FeatureNew checks to a more natural placeEli Schwartz1-2/+2
Now, warnings are unconditionally raised when parsing the wrap file, whether they are used or not. That being said, these warnings literally just check for a couple of keys used in the .wrap ini file. Moving these checks from the time of use to the time of loading, means that we no longer report warnings only when originally downloading or extracting the file or VCS repo. It also means we no longer report warnings in one subproject, when a wrap file is picked up from a different subproject because the first subproject actually does a dependency lookup. This caused issues for the WrapDB tooling, which uses patch_directory everywhere and the superproject requires a suitable minimum version of meson for this... but individual wraps might use a much lower version, and would then raise a warning (in strict mode, converted to an error) when it resolved a dependency from another WrapDB project. Fixes #9118
2021-10-12interpreter: Fix missing holder entry (fixes #9389)Daniel Mensinger1-0/+2
2021-10-10Add --vsenv command line option and active VS only when neededXavier Claessens1-0/+10
2021-10-10Fix typos discovered by codespellChristian Clauss5-12/+12
2021-10-10Revert "interpreter: Add FeatureNew check"Eli Schwartz1-12/+0
This reverts commit c0efa7ab22f8900f6fa1dadf0d306ec375569c8d. This was a nice idea, or a beautiful hack depending on your perspective. Unfortunately, it turns out to be a lot harder than we originally thought. By operating on bare nodes, we end up triggering a FeatureNew on anything that isn't a string literal, rather than anything that isn't a string. Since no one else has come up with a better idea for implementing a FeatureNew, let's just revert it. Better to not have a warning, than have it trigger way too often.
2021-10-10Be more strict about target names with slashes.Jussi Pakkanen1-0/+8
2021-10-09modules/windows: use typed_kwargsDylan Baker1-1/+8
2021-10-08Add support for module optionsXavier Claessens1-0/+1
2021-10-08add install_emptydir functionEli Schwartz2-0/+16
This replaces the absolute hack of using ``` install_subdir('nonexisting', install_dir: 'share') ``` which requires you to make sure you don't accidentally or deliberately have a completely different directory with the same name in your source tree that is full of files you don't want installed. It also avoids splitting the name in two and listing them in the wrong order. You can also set the install mode of each directory component by listing them one at a time in order, and in fact create nested structures at all. Fixes #1604 Properly fixes #2904
2021-10-06interpreter: Move RangeHolder out of interpreterbase to interpreterDaniel Mensinger3-3/+39
2021-10-06interpreter: Holderify arrays and dictsDaniel Mensinger5-0/+200
This is the final refactoring for extracting the bultin object logic out of Interpreterbase. I decided to do both arrays and dicts in one go since splitting it would have been a lot more confusing.
2021-10-04f-stringsEli Schwartz1-1/+1
2021-10-04fix extra whitespaceEli Schwartz5-6/+0
discovered via flake8 --select E303
2021-10-04work around flake8 F811 for T.overload redefined functionsEli Schwartz1-2/+2
Since typing != T as far as flake8 is aware, give the linter an extra hint.
2021-10-04remove f from f-string that has no formattingEli Schwartz1-1/+1
2021-10-04better error message for modules returning the wrong valueEli Schwartz1-1/+1
2021-10-04various python neatness cleanupsEli Schwartz2-2/+2
All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
2021-10-04Merge pull request #8960 from mensinda/yamlDocJussi Pakkanen1-1/+2
Reference Manual 2.0
2021-10-04interpreter: improve the error message about install_modeZbigniew Jędrzejewski-Szmek1-12/+11
We wrote: ERROR: install_emptydir keyword argument "install_mode" permissions string must be exactly 9 characters, got "4" in the form rwxr-xr-x Let's change this around to be easier to read. Also, 1-based numbering was used (for components) and 0-based for "bits". And actually the "bits" are not bits, but octal digits. So say "permissions character 1", "permissions character 2". And finally change "must be … if provided" to "can only be". (If it isn't provided, it "is not", so the sentence is still valid. The user will only get this error if they provide something, so we don't need to be super precise and say "if provided". And then we avoid confusing the reader whether it's "if provided" attaches to the the "False" or to the whole sentence.)
2021-10-03docs: Fixes found during the YAML conversion processDaniel Mensinger1-1/+2
2021-09-30interpreter: move some of CustomTarget's args to type_checkingDylan Baker2-32/+61
As there are so many wrappers that need these as well
2021-09-30dependency: Allow searching for multiple namesXavier Claessens1-2/+4
2021-09-30interpreter: Use typed_kwargs for func_custom_targetDylan Baker3-24/+138
This does not convert the build side, or remove any of the checking it does. We still need that for other callers of custom target. What we'll do for those is add an internal interface that defaults things, then we'll be able to have those callers do their own validation, and the CustomTarget validation machinary can be removed. Fixes #9096
2021-09-30interpreter: Allow FileMode to be passed to _get_kwarg_install_modeDylan Baker1-0/+2
This will happen as we transition from doing the conversion in the function body to using the KwargInfo to make that change. If we get one just return it.
2021-09-30interpreter: move command kwarg to type_checkingDylan Baker2-8/+12
2021-09-30interpreter/type_checking: Add DEPEND_FILES_KWDylan Baker1-1/+8
since most of the Target classes use this, let's just go ahead and add it here instead of moving it later
2021-09-30interpreter: move KwargInfo('depends') to type_checkingDylan Baker2-7/+10
2021-09-30interpreter: DEPFILE_KW should be Optional[str]Dylan Baker2-3/+3
2021-09-30interpreter: remove duplicate permittedKwargsDylan Baker1-2/+0
func_generator already has typed_kwargs, it doesn't need both.
2021-09-30interpreter: move DEPFILE_KW to type_checkingtDylan Baker2-2/+9
2021-09-30interpreter: use typed_kwargs on func_run_targetDylan Baker2-23/+31
2021-09-30Make custom_target() name argument optionalXavier Claessens1-3/+10
2021-09-28Merge pull request #9014 from bonzini/mixed-language-linkJussi Pakkanen1-0/+15
Use appropriate compiler for the source file for "links" tests with file argument
2021-09-26fix message function accepting bools and casting to stringEli Schwartz1-0/+2
This was allowed by accident despite what meson said would work, because in python a bool counts as a subclass of int.
2021-09-25interpreter: Add FeatureNew checkDaniel Mensinger1-0/+12
2021-09-25Remove helpers.check_stringlist()Daniel Mensinger2-10/+21
2021-09-25interpreter: Introduce StringHolderDaniel Mensinger5-3/+186
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-24Merge pull request #9167 from dcbaker/submit/meson-main-type-checkingJussi Pakkanen2-130/+163
Add type annotations and type checking to meson main
2021-09-24Add option to to transpile Cython to C++Dylan Baker1-3/+8
This patch adds a new meson built-in option for cython, allowing it to target C++ instead of C as the intermediate language. This can, of course, be done on a per-target basis using the `override_options` keyword argument, or for the entire project in the project function. There are some things in this patch that are less than ideal. One of them is that we have to add compilers in the build layer, but there isn't a better place to do it because of per target override_options. There's also some design differences between Meson and setuptools, in that Meson only allows options on a per-target rather than a per-file granularity. Fixes #9015