aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2021-06-16Fix assert(not true) raising backtraceXavier Claessens1-1/+1
When no message is provided to assert(), it uses the ast printer to show the condition that failed. In this case the 'not' is the first string appended to the result, self.result[-1] would raise range error.
2021-06-16Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-moduleJussi Pakkanen7-263/+484
Rewrite the Qt module for type safety!
2021-06-15modules/qt: sort and clean up dependenciesDylan Baker1-8/+9
2021-06-15modules/qt: Return GeneratedListHolder instead of GeneratedListDylan Baker1-2/+2
This really shouldn't be necissary, but fixing the typing annotations of ModuleReturnValue is much harder than just returning the Holder directly.
2021-06-15interpreterobjects: Clean up GeneratedListHolderDylan Baker1-8/+3
Remove an unused method (that didn't work before this series), and remove the ability to pass a Generator to the GeneratedListHolder, it's never used and it's weird and not the way Meson generally works now. While we're here, finish the type annotations.
2021-06-15build: Fully annotate GeneratedListDylan Baker1-11/+17
2021-06-15build: Generator add missing annotationsDylan Baker1-5/+6
2021-06-15build: cleanup Generator.proccess_files a bitDylan Baker1-5/+5
2021-06-15interpreterobjects|build: use typed_kwargs for generator.processDylan Baker4-27/+41
2021-06-15interpreter|build: use typed_pos_args and unholder in the interpreterDylan Baker2-31/+32
For generator.process_files. Just cleaner and nicer
2021-06-15build: Pass name of generator to initializerDylan Baker2-10/+17
It's really a property of the Generator what name to use, not something that should be passed to each call to process files.
2021-06-15interpreter|build: Do Generator keyword argument checking in the interpreterDylan Baker3-68/+37
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 Baker3-3/+22
Do the type checking in a nice tidy way
2021-06-15interpreter|build: Pass just the executable down to GeneratorDylan Baker3-12/+9
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 Baker2-8/+10
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-15modues/qt: Make use of typed_kwargs since/deprecation abiltiyDylan Baker1-15/+7
2021-06-15modules/qt: fix remaining typing issues and add to run_mypyDylan Baker1-13/+15
This just ignores the fact taht Generator is unchecked. Generator needs some real love in terms of type checking.
2021-06-15modules/qt: use type checking and annotations for compile_translationsDylan Baker1-13/+34
2021-06-15modules/qt: fully annotate and check qt.has_toolsDylan Baker4-8/+45
2021-06-15modules/qt: Make use of the default=[] availabilityDylan Baker1-29/+44
2021-06-15modules/qt: Type anotations and cleanupsDylan Baker1-17/+30
This adds a number of missing type annotations to existing functions, and makes a few members protected instead of public, as they were never meant to be public
2021-06-15modules: pass all proxied argumentsDylan Baker1-1/+1
2021-06-15modules: Fix type annotation importsDylan Baker1-1/+2
2021-06-15modules/qt: have pre-process dispatch to moc_compileDylan Baker1-31/+10
for ode sharing and simplicity
2021-06-15modules/qt: Add a compile_moc methodDylan Baker2-3/+62
This method only compiles moc resources, nothing else
2021-06-15modules/qt: use the compile_ui method inside the preprocess methodDylan Baker1-8/+2
for code deduplication
2021-06-15modules/qt: Add a compile_ui methodDylan Baker1-0/+33
Which is the same functionality split out of preprocess
2021-06-15modules/qt: Dispatch the preprocess method to the compile_resources methodDylan Baker1-30/+5
Which removes code duplication and makes our testing better
2021-06-15modules/qt: Add a `compile_resources` methodDylan Baker1-14/+98
This is a separate method for just handling qrc resources.
2021-06-15modules/qt: Deprecated the preprocess sources keyword argumentDylan Baker1-2/+3
2021-06-15modules/qt: Deprecated the *sources variadic argument to preproccessDylan Baker1-2/+5
It's confusing, and it's a duplicate of the `sources` keyword argument, which has always existed.
2021-06-15Merge pull request #8878 from dcbaker/submit/dependency-type-fixesJussi Pakkanen17-62/+100
Fix System dependencies setting type_name instead of name
2021-06-14backends: fix TestSerialisation.suite annotationsDylan Baker1-1/+1
It's a `str[]` not `str`
2021-06-14interpreter: use typed_*args for test and benchmarkDylan Baker4-87/+121
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 Baker2-13/+17
Requires a few small changes to the Rust module, as it calls `func_test`
2021-06-14interpreterbase: Add deprecated_values and since_values to KwargInfoDylan Baker1-0/+30
This allows checking specific values that are added or deprecated, which we do a surprising amount of. This works with both containers and scalar values
2021-06-14Fix issue with generated Cython code in a subdirRalf Gommers1-0/+2
This is a follow-up to gh-8706, which contained the initial fix to ninjabackend.py but somehow lost it. This re-applies the fix and adds a test for it. Without the fix, the error is: ninja: error: 'ct2.pyx', needed by 'libdir/ct2.cpython-39-x86_64-linux-gnu.so.p/ct2.pyx.c', missing and no known rule to make it
2021-06-14environment: Add LLVM suffixes for 11 and 12Ting-Wei Lan1-2/+4
Both LLVM 11 and 12 are stable releases. Note that FreeBSD changes the way to version LLVM executables in LLVM 10.
2021-06-14dependencies: Use a typing.NewType for Dependency.type_nameDylan Baker10-27/+33
This allow mypy to catch cases where we accidently assign the dependency name to the type_name, as it sees them as having different types (though at runtime they're all strings).
2021-06-14dependencies: Use the SystemDependencyDylan Baker8-37/+40
This fixes these dependencies, which currently return the name of the dependency as the type. Fixes #8877
2021-06-13dependencies: Add a System DependencyDylan Baker1-0/+29
as a base class for other system dependencies. This will later be used to to fix the type_name vs name confusion.
2021-06-13minit: do not misdetect files suffixed as "" or named "." or "c" or "s" as c#Eli Schwartz1-1/+1
You cannot `str() in str()` and expect it to act like `str() in list()`. Fixes regression in commit bbc2745dccc40761989a3e1efbe5a69eea0bc77e Unbreaks #6573 Fixes #8872
2021-06-11coredata: Invalidate deps cache when changing wrap_mode optionXavier Claessens2-2/+10
Fixes: #8858
2021-06-11interpreter: Split decorators from interpreterbase.pyDaniel Mensinger3-561/+576
2021-06-11interpreter: Split Disabler from interpreterbase.pyDaniel Mensinger3-37/+44
2021-06-11interpreter: Split base objects and helpers from interpreterbase.pyDaniel Mensinger4-177/+237
2021-06-11interpreter: Split exception calsses from interpreterbase.pyDaniel Mensinger3-25/+51
2021-06-11interpreter: Move interpreterbase.py into a new packageDaniel Mensinger2-2/+117
2021-06-10interpreter: Add missing FeatureNewKwarg for allow_fallbackXavier Claessens1-1/+1
2021-06-09cuda module: fully buy into new modules APIEli Schwartz1-3/+3
In commit 3340284805b96a4b9b62405f626020276341944c the new ModuleObject API got further updated to hide self.interpreter; at the time, the CUDA module got transferred over to the wrapper which does provide it. But it works fine without self.interpreter, so let's just use the best base class.