aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-06dependency: Verify fallback variable consistencyXavier Claessens7-5/+41
This change made `5 dependency versions` unit test fail because now once a subproject has been configured, the fallback variable is checked to be consistent. So it has to use new subproject because 'somesub' was already configured by previous tests.
2020-03-06override_dependency: Add failure testsXavier Claessens1-0/+11
2020-03-06Improve logged messages for overriden dependenciesXavier Claessens3-12/+27
2020-03-06Allow override_dependency() with a not-found depXavier Claessens3-0/+12
2020-03-06Simplify dependency() fallbackXavier Claessens6-15/+50
Now that subprojects can override the dependency name, there is no need to provide a variable name for the fallback any more.
2020-03-06Add meson.override_dependency()Xavier Claessens9-27/+151
Similar to meson.override_find_program() but overrides the result of the dependency() function. Also ensure that dependency() always returns the same result when looking for the same dependency, this fixes cases where parts of the project could be using a system library and other parts use the library provided by a subproject.
2020-03-06compilers: Don't deduplicate -L= argumentsDylan Baker1-0/+9
This breaks LDC and DMD, so just don't do it.
2020-03-06project_tests: Add a "shared_lib" typeDylan Baker4-12/+23
This allows fixing tests that produce .dylib's on macOS and .so's on elf Unices.
2020-03-06compilers/d: Fix get_allow_undefined_link_args on macOSDylan Baker1-0/+11
DMD and LDC are a real pain to use as linkers. On Unices they invoke the C compiler as the linker, just like meson does. This means we have to figure out what C compiler they're using and try to pass valid arguments to that compiler if the D compiler doesn't understand the linker arguments we want to pass. In this case that means gcc or clang. We can use-the -Xcc to pass arguments directly to the C compiler without dmd/ldc getting involved, so we'll use that.
2020-03-06compilers/d: Remove CompilerIsLInkerMixinDylan Baker1-16/+6
This was never really true of the D compilers, it made them more complicated than necessary and was incorrect in many cases. Removing it causes no regressions on Linux, at least in our rather limited test cases).
2020-03-06Update Users.mdAmit D1-0/+10
2020-03-06ast: Implement dummy evaluate_notstatementDaniel Mensinger2-0/+6
2020-03-06ast: Do not resolve dict keysXavier Claessens1-1/+1
Fixes: #6748
2020-03-05Make use of unholderDylan Baker8-112/+43
We have a lot of cases of code like: ```python if hasattr(var, 'held_object'): var = var.held_object` ``` replace that with the unholder function.
2020-03-05mypy: Ignore missing importsDylan Baker1-1/+2
Otherwise modules like tqdm will cause mypy to emit an error, since they're untyped.
2020-03-05ci: Add mesonlib to modules to lint with mypyDylan Baker1-1/+1
2020-03-05dependencies/boost: Fix a number of mypy issuesDylan Baker1-8/+8
Since mypy can now see type information for mesonlib it can determine a number of potential errors in the boost module, this fixes those.
2020-03-05dependencies: Use CompilerType not CompilerDylan Baker1-2/+2
Compiler is invariant, in other words Compiler and only Compiler can fulfull it, it's derived classes cannot be used. CompilerType is covariant, that is Compiler and any derived class can fulfill it. This fixes a number of issues in the boost module.
2020-03-05remove ability to pass multiple keys to extract_as_listDylan Baker6-20/+10
This makes the typing annotations basically impossible to get right, but if we only have one key then it's easy. Fortunately python provides comprehensions, so we don't even need the ability to pass multiple keys, we can just [extract_as_list(kwargs, c) for c in ('a', 'b', 'c')] and get the same result.
2020-03-05Remove some uses of mesonlib.run_onceDylan Baker2-5/+4
These are basically doing what mlog.log(..., once=True) does, so lets just use that. The once argument to mlog is newer, so these probably should have been changed already.
2020-03-05mesonlib: use mlog instead of printDylan Baker1-2/+2
2020-03-05mesonlib: Replace unholder argument to listifyDylan Baker7-52/+51
listify shouldn't be unholdering, it's a function to turn scalar values into lists, or flatten lists. Having a separate function is clearer, easier to understand, and can be run recursively if necessary.
2020-03-05mesonbuild/mesonlib: Add type annotationsDylan Baker5-125/+230
2020-03-04mesonlib: Fix File.__eq__ to return NotImplementedDylan Baker1-0/+2
The implementation assumes another File, but doesn't properly guard that. Let's do that guarding.
2020-03-04mesonlib: Use textwrap.dedentDylan Baker1-4/+7
This is mostly just to help folding editors like vim, which get confused by the non-indented code. It also helps readability, IMHO.
2020-03-05unit tests: Test the buildtype table in the docsNirbheek Chauhan1-0/+23
2020-03-05unit tests: Rewrite documentation table parsing codeNirbheek Chauhan1-32/+44
The old logic was completely broken, and didn't even assert that the specified section was found at all. The CPU families test was broken because of this. Luckily, the table didn't go out of sync with the code. It now also doesn't assume that each section has only one table. This fixes the test now that we document the buildtype/optimization/debug mapping in a second table inside the `Universal options` section.
2020-03-05Document the details of optimization+debug vs buildtype [skip ci]Nirbheek Chauhan1-0/+17
Otherwise you have to hunt through the source code. Specifically, this is defined in `mesonbuild/coredata.py`: `set_buildtype_from_others()` and `set_others_from_buildtype()`
2020-03-04mesonbuild: Add mcompile commandDylan Baker5-2/+163
This is tested working with both msbuild and ninja/samu. Since our xcode support is pretty much broken I didn't bother. Fixes #6670
2020-03-04interpreter: add 'name' method to BuildTargetHolderStéphane Cerveau5-2/+13
As any child of BuildTargetHolder might need the name of the object, provides a method to get object name. This is useful in gst-build to display the plugin name and not the filename.
2020-03-03Set c_winlibs/cpp_winlibs for Clang in the same way as for GCCMartin Storsjö2-0/+12
clang-cl is handled as a separate case (ClangClCCompiler), which already gets c_winlibs from VisualStudioLikeCCompilerMixin.
2020-03-03Cherry-picking - (rm python2 % add python3 .format) (#6725)Michael Brockus6-70/+65
2020-03-03pkgconfig: Fix deprecation message (fixes #6720)Stéphane Cerveau1-2/+1
Deprecation warning was unable to display because of patch c8f8d58273a40d94c820dccab54a7ae2d948cb8a fixes #6720
2020-03-02fix typoMichael1-1/+1
2020-03-02add -C to meson initMichael2-0/+12
2020-03-02Merge pull request #6316 from mensinda/typesAstDylan Baker15-639/+700
types: Annotations for ast, mparser.py, interpreterbase.py
2020-03-02Users.md: add libratbagStephan Lachnit1-0/+1
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-03-02coredata: init_builtins should always call libdir_cross_fixupStéphane Cerveau1-1/+1
As the interpreter reinitialize the coredate builtins, need to call again libdir_cross_fixup
2020-03-02types: Remove redundant __init__() -> None annotationDaniel Mensinger8-40/+40
2020-03-02types: Use import typing as TDaniel Mensinger4-97/+96
2020-03-02review: Initial fixupDaniel Mensinger6-45/+51
2020-03-02types: Annotate ast/introspection.pyDaniel Mensinger3-49/+61
2020-03-02types: (partially) annotate interpreterbase.pyDaniel Mensinger3-202/+236
This commit annotates most of interpreterbase.py. However, there are stil the @wraps missing, since I am unsure what the types are supposed to be here.
2020-03-02types: Annotate ast/interpreter.pyDaniel Mensinger6-50/+56
2020-03-02types: Annotate the AST visitorsDaniel Mensinger7-90/+93
2020-03-02types: Annotate mparser.pyDaniel Mensinger9-254/+255
This also fixes that the keys in ArgumentNode.kwargs are all of the type BaseNode now. Before this commit, it was possible that both strings and Nodes where used as keys.
2020-03-01Merge pull request #6692 from xclaesse/summary-warningsJussi Pakkanen6-23/+59
Summary improvements
2020-03-01meson: cache the results of can_compileMarcel Hollerbach1-0/+1
the check for which files can be compiled are called again and again on the same files over and over again. Caching this here shaves off 11s of the build time of efl (which has grown in the last 3 versions to over 40 sec. again)
2020-03-01CompilerArgs: make lookup fasterMarcel Hollerbach1-7/+26
in order to deduplicate arguments as much as possible, we need to check if a argument is already part of the list. Which is quite slow because we are checking 3 lists for that. In smaller projects this might be not of interested. However, in efl things are quite "heavy", alone generating the ninja file took 40 sec.. 16 sec. are spent in __iadd__ of CompilerArgs. What this patch does to speed this all up is: 1. We only check if a element is in post when we know that it must be in post same for pre. 2. the checks for if we already do contain a specific value are now done via a dict, and not via the list. This overall brings the time from 16 sec. spent in __iadd__ to 9 sec. in __iadd__. Another possible solution for all this is to have a internal structure of CompileArgs of trees, so you have the "basic" layer of arguments where the position does not matter. Additionally, you have two stacks of lists, the pre stack and the post stack, duplicates can then be checked when itereting, which would safe another ~4s in terms of efl. However, i do not have time for this undertaking right now.
2020-03-01Merge pull request #6627 from jon-turney/cwd-relative-file-locationsJussi Pakkanen14-85/+137
Consistently report file locations relative to cwd