aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2021-10-07clike compilers: drop semicolon at function endVladimír Čunát1-4/+4
warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
2021-10-07modules/gnome: deprecate yelp variadic sourcesDylan Baker1-1/+7
Yelp currently can take sources two different ways, the first is via variadic arguments, the second is by a keyword argument. If the keyword is passed then the variadic arguments are silently ignored, which is obviously not ideal. Fortunately the variadic form was never documented, and is likely not in wide use. This patch fixes it by deprecating the variadic form, and warning if both are passed. It does not change behavior as someone may be relying on it.
2021-10-06interpreter: Move RangeHolder out of interpreterbase to interpreterDaniel Mensinger5-28/+39
2021-10-06interpreter: Holderify arrays and dictsDaniel Mensinger10-424/+345
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-06Fix compiler detection for cl/clang-clJesse Natalie1-1/+1
If the compiler specified is a path to a compiler, the current detection is broken. It needs to use just the compiler name instead.
2021-10-06cmake: Implement support for interpreting link "keywords"Daniel Mensinger1-10/+32
CMakes `target_link_libraries()` supports certain keywords to only enable specific libraries for specific CMake configurations. We now try our best to replicate this for Meson dependencies. Fixes #9197
2021-10-06cmake: Warn if we could use IMPORTED CMake targetsDaniel Mensinger1-1/+32
2021-10-04wrap clone: be less noisy when doing automated code checkoutsEli Schwartz1-4/+5
There are two possible issues, both of which emit very long messages from git: - when shallow cloning via depth + a pinned commit we locally init rather than cloning; use an almost-certainly not conflicting dummy branch name - any time a checkout of a revision is performed, it might not be a branch name, in which case it will be a detached HEAD. By default git is very noisy about this -- it wants you to know what happened and how not to mess up. But wraps aren't per default intended for user editing and development, it's just part of the internal transport which meson uses. So, temporarily squelch this advice. Do not permanently configure the repo like this though, because the user *might* cd in and start developing on the subproject; in this case, any additional git advice they trigger is their responsibility (and they probably do want it). Fixes #9318
2021-10-04backend/vs: Generate dependencies for CustomTargetIndex for a CustomTarget.Andres Freund1-0/+2
Test & fix.
2021-10-04backend/vs: process link dependencies.Andres Freund1-0/+10
Partially-Fixes: #1799
2021-10-04Record build in BuildTarget.link_depends, not just output of targets.Andres Freund1-7/+4
To be able to handle link_depends in backends that do not just operate on a file basis like ninja, information about the targets, not just their output is required.
2021-10-04modules/external_project: use typed_kwargsDylan Baker1-23/+33
Which resolves all of the remaining typing issues.
2021-10-04mdoules/external_project: fix most of the mypy warnings/errorsDylan Baker1-29/+39
2021-10-04mesonlib: ConfigurationData can also be a `Dict[str, Tuple[Str, Optional[str]]]`Dylan Baker1-2/+2
2021-10-04dependencies: Dependency.sources can have CustomTargetsDylan Baker1-5/+6
2021-10-04modules/external_project: clean up and sort modulesDylan Baker1-6/+7
2021-10-04remove printf debuggingEli Schwartz1-1/+0
Why did this dumb thing of mine ever get committed???
2021-10-04condense linesEli Schwartz4-22/+11
2021-10-04f-stringsEli Schwartz13-77/+66
2021-10-04use list unpacking to simplify for loop referencesEli Schwartz1-4/+5
2021-10-04fix extra whitespaceEli Schwartz18-28/+0
discovered via flake8 --select E303
2021-10-04use idiomatic python for membership testsEli Schwartz1-1/+1
"X not in Y" is preferred over "not X in Y", as the former is more readable.
2021-10-04remove useless variables that are no longer or were never usedEli Schwartz3-3/+1
2021-10-04work around flake8 F811 for T.overload redefined functionsEli Schwartz2-4/+4
Since typing != T as far as flake8 is aware, give the linter an extra hint.
2021-10-04remove double importEli Schwartz1-2/+2
Imported both inside and outside of T.TYPE_CHECKING, the runtime import can be removed by quote-deferring one of the use sites. Update: In between then and now, this got removed from T.TYPE_CHECKING, move it back there rather than preserving the runtime import.
2021-10-04remove f from f-string that has no formattingEli Schwartz3-3/+3
2021-10-04fix incorrect porting from % formatting to .format methodEli Schwartz1-1/+1
(var,) is the correct way to pass values to a percent formatted string, but not to .format so we would end up printing something like: unexpected input at line (4,) Upgrade to an f-string and insert the correct value correctly.
2021-10-04coding style: don't format an empty string with another stringEli Schwartz1-1/+1
'{}'.format('foo') for any given value of 'foo' (in this case, a function returning a string), can always just be 'foo' directly, which is a lot more readable.
2021-10-04better error message for modules returning the wrong valueEli Schwartz1-1/+1
2021-10-04various python neatness cleanupsEli Schwartz10-14/+14
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 Pakkanen2-5/+11
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-03fix typo in error message breaking newline escapeEli Schwartz1-1/+1
Broken in commit 3feaea6b29197cd224fbce0ac65fd43d08c3beac.
2021-10-03modules/i18n: fix gettext use of --datadirs paramDan Streetman1-1/+1
The previous commit bd2fcb268b9ff48797bebb6a2ef94d2741234191 accidentally used the wrong var so the param name was missing, leading to an error of "unrecognized arguments" for the datadirs parameter value.
2021-10-03cmake module: if cmake cannot be found, do not tracebackEli Schwartz1-0/+3
We ended up passing a NoneType as the program binary, which is a very awkward way to communicate an error when failing to write a basic package version file.
2021-10-03docs: Fixes found during the YAML conversion processDaniel Mensinger1-1/+2
2021-10-03docs: Hook up the new RefMan generator to MesonDaniel Mensinger1-4/+9
2021-10-02Improve linker detection failure error message.Jussi Pakkanen1-3/+5
2021-10-01rust: dependencies need to cause a rebuild/relink not just reorderDylan Baker1-1/+6
Otherwise changes to a dependency don't propogate
2021-09-30modules/i18n: Fix remaining mypy spotted issuesDylan Baker1-20/+31
2021-09-30modules/i18n: use typed_kwargs for gettextDylan Baker1-19/+50
There were two allowed kwargs that were unused, I've dropped them for now, though I need to check if they were documented. If they are then we need to deprecate them to remove them, otherwise we'll just leave them removed.
2021-09-30modules/i18n: Use typed_kwargs for merge_fileDylan Baker1-26/+61
2021-09-30modules/i18n: use typed_pos_argsDylan Baker1-4/+6
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-30modules/i18n: add easy type annotationsDylan Baker1-7/+12
2021-09-30modules/i18n: sort and clean up importsDylan Baker1-5/+7
2021-09-30modules: make ReturnValue.new_objects covariantDylan Baker1-1/+1
Otherwise we have to do a lot of casting to ensure that we get the appropriate invariant type
2021-09-30dependency: Allow searching for multiple namesXavier Claessens1-2/+4
2021-09-30interpreter: Use typed_kwargs for func_custom_targetDylan Baker7-49/+181
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-30build: Prepare CustomTarget.process_kwargs to co-existDylan Baker1-19/+19
We still need this to co-exist as long as there are interfaces for CustomTarget other than `func_custom_target`, this gets us there.