Eli Schwartz
493dc6ed10
move base class for system dependencies into base.py
...
In accordance with review comments; it's small enough this seems fitting.
3 years ago
Xavier Claessens
fbeb62101c
doc: Add missing modules to dropdown list
3 years ago
Xavier Claessens
b6d754a40c
interpreter: Extract dependency() logic into its own helper class
...
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.
3 years ago
Xavier Claessens
3970f269fd
Fix assert(not true) raising backtrace
...
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.
3 years ago
Jussi Pakkanen
6fb2f86379
Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-module
...
Rewrite the Qt module for type safety!
3 years ago
andy5995
537adce5d8
Users.md: add canfigger library
3 years ago
Dylan Baker
0f5e55a749
docs: Add a page for qt6
...
Which has been missing since the module was added in 0.57.0.
This also uses the include syntax
3 years ago
Dylan Baker
7535736108
docs: Use an include for the qt modules
...
Insteadf of qt4 referencing the Qt5 page, include the same content in
both.
3 years ago
Dylan Baker
bfaa529a7a
modules/qt: sort and clean up dependencies
3 years ago
Dylan Baker
2a8a6bb881
modules/qt: Return GeneratedListHolder instead of GeneratedList
...
This really shouldn't be necissary, but fixing the typing annotations of
ModuleReturnValue is much harder than just returning the Holder
directly.
3 years ago
Dylan Baker
ec48dbd2d6
interpreterobjects: Clean up GeneratedListHolder
...
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.
3 years ago
Dylan Baker
a65429d57b
build: Fully annotate GeneratedList
3 years ago
Dylan Baker
4e7f59d70d
build: Generator add missing annotations
3 years ago
Dylan Baker
0698a50c00
build: cleanup Generator.proccess_files a bit
3 years ago
Dylan Baker
c422621317
interpreterobjects|build: use typed_kwargs for generator.process
3 years ago
Dylan Baker
5952dc9818
interpreter|build: use typed_pos_args and unholder in the interpreter
...
For generator.process_files. Just cleaner and nicer
3 years ago
Dylan Baker
2043461b87
build: Pass name of generator to initializer
...
It's really a property of the Generator what name to use, not something
that should be passed to each call to process files.
3 years ago
Dylan Baker
35bdaada1d
interpreter|build: Do Generator keyword argument checking in the interpreter
...
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.
3 years ago
Dylan Baker
491c756dc9
interpreter: use typed_kwargs for func_generator
...
Do the type checking in a nice tidy way
3 years ago
Dylan Baker
d2c1ab40a0
interpreter|build: Pass just the executable down to Generator
...
This requires that the interpreter has done the validation, which it now
does at all callsites. This simplifies the Generator initializer.
3 years ago
Dylan Baker
2ac9b32391
interpreter: Do not create Generator in GeneratorHolder
...
This is an odd pattern, not the way most Holders work, and would be
problematic if a method wanted to return a Generator.
3 years ago
Dylan Baker
d064466e8b
modues/qt: Make use of typed_kwargs since/deprecation abiltiy
3 years ago
Dylan Baker
cf6e8d6834
docs: update qt module documentation with types and new files
3 years ago
Dylan Baker
3824e30f7a
modules/qt: fix remaining typing issues and add to run_mypy
...
This just ignores the fact taht Generator is unchecked. Generator needs
some real love in terms of type checking.
3 years ago
Dylan Baker
3c4c7d0429
modules/qt: use type checking and annotations for compile_translations
3 years ago
Dylan Baker
2bc7a1b3da
modules/qt: fully annotate and check qt.has_tools
3 years ago
Dylan Baker
61ddceb3b9
modules/qt: Make use of the default=[] availability
3 years ago
Dylan Baker
ffa83f7f8a
modules/qt: Type anotations and cleanups
...
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
3 years ago
Dylan Baker
ce3a7ec19d
modules: pass all proxied arguments
3 years ago
Dylan Baker
e23f78141a
modules: Fix type annotation imports
3 years ago
Dylan Baker
118f70fede
modules/qt: have pre-process dispatch to moc_compile
...
for ode sharing and simplicity
3 years ago
Dylan Baker
2322804a4d
modules/qt: Add a compile_moc method
...
This method only compiles moc resources, nothing else
3 years ago
Dylan Baker
ec592a4eca
modules/qt: use the compile_ui method inside the preprocess method
...
for code deduplication
3 years ago
Dylan Baker
fcdb0f9879
modules/qt: Add a compile_ui method
...
Which is the same functionality split out of preprocess
3 years ago
Dylan Baker
ed06ae3db1
modules/qt: Dispatch the preprocess method to the compile_resources method
...
Which removes code duplication and makes our testing better
3 years ago
Dylan Baker
d27948b1dc
modules/qt: Add a `compile_resources` method
...
This is a separate method for just handling qrc resources.
3 years ago
Dylan Baker
4575ed3d31
modules/qt: Deprecated the preprocess sources keyword argument
3 years ago
Dylan Baker
f559e56d0a
docs/qt: document all of the arguments of the preprocess function
3 years ago
Dylan Baker
0fe3dc6571
modules/qt: Deprecated the *sources variadic argument to preproccess
...
It's confusing, and it's a duplicate of the `sources` keyword argument,
which has always existed.
3 years ago
Jussi Pakkanen
abf485ebc3
Merge pull request #8878 from dcbaker/submit/dependency-type-fixes
...
Fix System dependencies setting type_name instead of name
3 years ago
Jussi Pakkanen
f69962a4f7
Update macOS installation instructions.
3 years ago
Eli Schwartz
1086305715
doc: fix typo preventing correct page generation
...
This originally worked but was erroneously reported as wrong and thereby
regressed in commit a7357887c7
3 years ago
Dylan Baker
9851c25895
backends: fix TestSerialisation.suite annotations
...
It's a `str[]` not `str`
3 years ago
Dylan Baker
e2266e8708
interpreter: use typed_*args for test and benchmark
...
this also requires some changes to the Rust module, as it calls into the
test code.
3 years ago
Dylan Baker
86704261a7
interpreter: use typed_pos_args for func_test and func_benchmark
...
Requires a few small changes to the Rust module, as it calls `func_test`
3 years ago
Dylan Baker
5bb75dc3af
interpreterbase: Add deprecated_values and since_values to KwargInfo
...
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
3 years ago
Dylan Baker
6490b13f22
run_unittests: mock meson global before changing
...
For safety
3 years ago
Ralf Gommers
bc6df45663
Fix issue with generated Cython code in a subdir
...
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
3 years ago
Ting-Wei Lan
fc93c07e9e
environment: Add LLVM suffixes for 11 and 12
...
Both LLVM 11 and 12 are stable releases. Note that FreeBSD changes the
way to version LLVM executables in LLVM 10.
3 years ago
Dylan Baker
0412bdd753
dependencies: Use a typing.NewType for Dependency.type_name
...
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).
3 years ago