Dylan Baker
4d1cbd1b8a
compilers: Add cython file suffixes
4 years ago
Dylan Baker
cf17ef3867
environment: Add detection logic for cython
4 years ago
Dylan Baker
edf1a21722
compilers: Expose Cython compiler
4 years ago
Dylan Baker
e9681b463d
hack: compilers/cython: hardcode python 3 not 2
4 years ago
Dylan Baker
79e50caa7f
compilers: Add a cython Compiler
4 years ago
Dylan Baker
b6eb5c231c
build: Add type annotations for Generator
...
They're not 100% complete, but it's mostly there.
4 years ago
Daniel Mensinger
30e329aac9
typing: Fully annotate dependencies.framework
4 years ago
Daniel Mensinger
25875ae0d3
typing: Fully annotate dependencies.{detect,factory} + some other fixes
4 years ago
Daniel Mensinger
71906c4bf8
typing: Fully annotate dependencies.cmake
4 years ago
Daniel Mensinger
125566b329
typing: Fully annotate dependencies.platform
4 years ago
Daniel Mensinger
96473085e0
typing: Fully annotate dependencies.dub
4 years ago
Daniel Mensinger
6798bc8146
typing: Fully annotate dependencies.pkgconfig
4 years ago
Jussi Pakkanen
d13999f5b4
Merge pull request #8796 from xclaesse/wrapdbv2
...
wrap: Port to v2 protocol
4 years ago
Xavier Claessens
769fd50373
docs: Generate a table of all wrapdb releases
...
wrapdb CI will trigger Meson's CI to regenerate the list when
releases.json is updated.
4 years ago
Daniel Mensinger
240434b167
typing: Fully annotate dependencies.cuda
4 years ago
Daniel Mensinger
27bb5f536a
typing: mlog use StringProtocol
4 years ago
Daniel Mensinger
969ee9d85b
typing: Fully annotate dependencies.configtool
4 years ago
Daniel Mensinger
1d0bd562f1
typing: Fully annotate dependencies.coarrays
4 years ago
Dylan Baker
e0f62d1812
dependencies/detect: Add type annotations to find_external_dependency
4 years ago
Dylan Baker
6f562ed734
interpreterobjects: Fix type annotation for CustomTargetHolder
4 years ago
Dylan Baker
ff0fd7d44c
build: Add a type annotation to CustomTarget
4 years ago
Dylan Baker
b107171307
interpreterbase: Allow safely using mutable default values with typed_kwargs
...
It's really inconvenient to want a thing that is always a list, but not
be able to provide a default value of a list because of mutation. To
that end the typed_kwargs method now makes a shallow copy of the default
when using a `ContainerTypeInfo` as the type. This mean that using a
default of `[]` is perfectly safe.
4 years ago
Dylan Baker
8890a62499
interpreterbase: fix type annotations for typed_pos_args
...
It takes a tuple of any length, for optargs and varargs, not a tuple of
length 1
4 years ago
Xavier Claessens
62c53b834d
wrap: Port to v2 protocol
...
Fixes : #8754 .
4 years ago
Daniel Mensinger
df4d2bd247
typing: Fully annotate dependencies.base
4 years ago
Daniel Mensinger
f502a38d1c
typing: mlog: Simplify some typing with a TV_ variables
4 years ago
Daniel Mensinger
95b70bcb97
deps: Split dependencies.base
...
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
4 years ago
Dylan Baker
201dc64226
add a couple more type annotations
4 years ago
Dylan Baker
145d92aa27
build: Use ImmutableSetProtocol for lru_cache'd value
...
To avoid mutation if possible.
4 years ago
Dylan Baker
cfb847a1f0
build: use typing.Mapping for lru_cached dicts
...
Thankfully the typing module provides us an immutable protocol for
mappings, so we don't have to write one ourselves.
4 years ago
Dylan Baker
113a159514
use an immutable list for an lru_cached functions
...
When mutable items are stored in an lru cache, changing the returned
items changes the cached items as well. Therefore we want to ensure that
we're not mutating them. Using the ImmutableListProtocol allows mypy to
find mutations and reject them. This doesn't solve the problem of
mutable values inside the values, so you could have to do things like:
```python
ImmutableListProtocol[ImmutableListProtocol[str]]
```
or equally hacky. It can also be used for input types and acts a bit
like C's const:
```python
def foo(arg: ImmutableListProtocol[str]) -> T.List[str]:
arg[1] = 'foo' # works while running, but mypy errors
```
4 years ago
Dylan Baker
f8be4f8fc7
adding a _typing module
...
this is a place that *must* only be imported inside a if
typing.TYPE_CHECKING block. It is a mixture of smoothing over thinigs
that moved from typing_extensions to typing in later python versions and
useful but typing only code.
This makes typing_extensions required for python versions older than
3.8 *when running mypy*. typing_extensions should *only* be imported
inside an `if typing.TYPE_CHECKING` block (include the new _typing.py
module) to ensure that it doesn't become a runtime dependency
4 years ago
Dylan Baker
023722b2c6
test cases/common/103 has header symbol: set c++ standard
...
On mac this appears to default to c++98, which in turn falls over with
boost that requires at least c++11
4 years ago
Jussi Pakkanen
99452dde26
Merge pull request #8812 from mensinda/cmakeToolchain
...
CMake toolchain file improvements (fixes #8293 )
4 years ago
Jussi Pakkanen
83581f7fc1
Do not delete workdir in case scan-build fails.
4 years ago
Xavier Claessens
4516b7a8a9
docs: Fix typo in github pages repo URL
4 years ago
Xavier Claessens
4dec7dbb71
ci: Automatically update website when pushing to master
4 years ago
Xavier Claessens
16c3f03394
typed_kwargs: Add since and deprecated annotations
4 years ago
Dylan Baker
6aef800ba8
modules/fs: Use typed_kwargs
4 years ago
Dylan Baker
521b92e499
interpreterbase: Add a function for type checking keyword arguments
4 years ago
Daniel Mensinger
9b5463681e
cmake: select correct generator in toolchain.py
4 years ago
Naveen M K
7a6ad2953a
Don't use `os.path.relpath` in dist command
...
This is problematic when we meson is installed in the different
root(say C:) while building from another root(say D:).
This is how it is done in mesonpep517 and causes problems
because of that.
4 years ago
Dylan Baker
c6ec13e6bf
Only try to get RSP syntax if RSP is supported ( #8804 )
4 years ago
Daniel Mensinger
f0812baf8d
cmake: exclude generated files from the buildsystem files list
4 years ago
Daniel Mensinger
06f528a5b7
cmake: Update test case
4 years ago
Daniel Mensinger
49c730ef05
cmake: Fix CMakeToolchain ( fixes #8293 )
...
Instead of guessing the internal compiler
variables, Meson now runns CMake once to
determine what they actually are.
4 years ago
Daniel Mensinger
0e777e7c90
cmake: CMakeTraceParser improvements
...
- handle cached CMake variables differently
- associate variables with source files
- better performance (str to Path and generator expressions)
4 years ago
Xavier Claessens
25fa2d4f7b
vsenv: Recommend using "meson compile" wrapper
...
When meson has setup the VS environment, running ninja to build won't
work, user should use meson wrapper to compile.
4 years ago
Jussi Pakkanen
a9b65b421e
Remove HFS workaround as everyone should use APFS by now.
4 years ago
Xavier Claessens
2fb24b18e1
unstable_external_project: Remove unused imports
4 years ago