Commit Graph

9887 Commits

Author SHA1 Message Date
Dylan Baker 1e93d2875e compilers/mixins/emscripten: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 04a98baafb compilers/mixins/elbrus: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker bc532a8543 compilers/mixins: make compcert type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 48a181866f compilers/mixins/clang: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 4b52184dc6 compilers/mixings/gnu: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker bb3fe3c451 compilers/mixins/clike: fix mypy issues 2020-09-24 12:14:13 -07:00
Dylan Baker 4cfddd1fe6 compilers/mixins/ccrx: make mypy safe 2020-09-24 12:14:13 -07:00
Dylan Baker c93395bfc7 compilers/mixins/c2000: Make mypy safe 2020-09-24 12:14:13 -07:00
Dylan Baker b7db3660a0 compilers/mixins/arm: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 79d1ecd5bc compilers/compilers: Fully type annotate 2020-09-24 12:14:13 -07:00
Dylan Baker ce04a279ae ast/introspection: Fix typing violation due to untyped functions
When we add type annotations to this in compilers this will break,
unless we've already filtered out the non-string arguments.
2020-09-24 12:14:13 -07:00
Dylan Baker d326c87fe2 compilers: Use a distinct type for compile/link results
Currently we do some crazy hackery where we add extra properties to a
Popen object and return that. That's crazy. Especially since some of our
hackery is to delete attributes off of the Popen we don't want. Instead,
let's just have a discrete type that has exactly the properties we want.
2020-09-24 12:14:13 -07:00
Dylan Baker 1b63dcc531 zsh: Add completions for meson compile 2020-09-23 12:34:24 -07:00
Dylan Baker 9f893384db zsh: add completions for subprojects 2020-09-23 12:24:19 -07:00
Dylan Baker 3afaa879ec zsh: add wrap completions
This is still missing completions for promote, but I can't figure out
how to find the wraps in subprojects that are not in the parent project
when those projects haven't been fetched yet.
2020-09-23 10:19:56 -07:00
Dylan Baker f0db3d3750 zsh: add missing arguments to meson test completions
This also reorders the options internally to match the output of meson
test --help, which makes it easier to diff
2020-09-23 09:19:35 -07:00
Dylan Baker c6f7588afa zsh: Add completions for meson init 2020-09-23 09:16:27 -07:00
Xavier Claessens 55ea461993 Deprecate meson.build_root() and meson.source_root()
Those function are common source of issue when used in a subproject because they
point to the parent project root which is rarely what is expected and is a
violation of subproject isolation.
2020-09-23 12:14:32 -04:00
Dylan Baker a137cd0bfb zsh: Add completions for meson install 2020-09-23 09:02:32 -07:00
Dylan Baker 8fa0548e08 pylint: turn on a few more errors 2020-09-22 17:57:03 -07:00
Dylan Baker f342efd080 pylint: turn on bad-indentation error
and fix all of the bad indentation
2020-09-22 17:57:03 -07:00
Dylan Baker 3b292a04b8 pylint: turn on warnings for abstract classes
We're using these now, so having some error checking to make sure we
don't have paths were we're trying to instantiate an abstract class
would be good.
2020-09-22 17:57:03 -07:00
Dylan Baker b034f8cf61 pylint: Turn on warnings for incorrect number of args
This catches some very real errors.

The one in scalapack is pretty silly actually, it's failing to figure
out that the exploded list is at least two arguments. However, the code
is actually clearer by not using a list and exploding it, so I've done
that and pylint is happy too.
2020-09-22 17:57:03 -07:00
Dylan Baker 80af160036 zsh: add meson dist completions 2020-09-22 16:58:08 -07:00
Dylan Baker 87248d9020 mdist: actually constrain the choices of the --formats option
Since we already have that list available.
2020-09-22 16:58:08 -07:00
Dylan Baker ecefe45f8e zsh: Add ability to complete depedency paths
using , separated syntax
2020-09-22 16:58:08 -07:00
Dylan Baker 670bc63fda zsh: add missing options for meson introspect 2020-09-22 16:08:45 -07:00
Dylan Baker f2572ea077 zsh: share common options between meson configure and meson setup 2020-09-22 16:07:09 -07:00
Dylan Baker 84d5233b5f zsh: Add missing options for meson setup 2020-09-22 16:01:50 -07:00
Dylan Baker 250c4463b4 zsh: remove binaries that are not longer installed 2020-09-22 16:01:34 -07:00
Jon Turney bd16b4846f
Add a test of a failed pickled command 2020-09-21 14:01:31 +01:00
Nirbheek Chauhan 94ea9d97be docs: Clarify what literal strings mean [skip ci]
Someone on IRC was confused by this paragraph.
2020-09-21 15:36:24 +05:30
Jussi Pakkanen 13a8e1d26e Improve docs for creating new wraps. [skip ci] 2020-09-21 01:48:30 +03:00
Jon Turney 194dcdef03
Make meson_exe report pickled command when it fails
Make 'meson --internal exe --unpickle' report the actual command
executed when it fails, which is otherwise invisible.
2020-09-20 12:57:50 +01:00
Jon Turney c72625c2a7
Improve description of meson wrapped custom commands
I've always found ninja reporting 'a meson_exe.py custom command'
unclear and confusing. Instead say we are invoking a custom command,
wrapped by meson, and why.
2020-09-20 12:57:44 +01:00
Dylan Baker 007ece4659 pylint: Turn on a few more good warnings 2020-09-18 14:49:58 -07:00
Dylan Baker cb0265a6b2 pylint: Catch cases of `if len(container)` which should be replaced by `if container`
Unfortunately this doesn't catch other abuses of len(continauer) like,
`len(container) <comparator> 0`, see: https://github.com/PyCQA/pylint/issues/3751
2020-09-18 14:49:58 -07:00
Sebastian Meyer 35a5a69355 Some fixes for CompCert
1. Like with gcc's `ld`, also use the `group_start` code to create a
   `--start-group`/`--end-group`
2. xc16 tricked into believing the 'link_whole' was about `--*-group`,
   but it should use gcc's `--whole-archive` instead.
3. Not clear what the get_lib_prefix should really do, but for picolibc
   it seems I want just `''`.

The problem with picolibc was that the `-l` would be prefixed to a lib
like `picolib/libm/libm.a`. Though of course the `-l` would be necessary
for just a plain `m` (that's what I assumed this would be used for).
I think this might need some clarification from the meson devs ;-)
2020-09-18 08:59:39 -07:00
Martin Storsjö 9d8906363e Support identifying msvc dependency prefix with a path starting with a backslash 2020-09-18 05:30:49 +00:00
Xavier Claessens 17f07a53d0 msubprojects: Fix unit tests on Windows 2020-09-18 03:01:15 +00:00
Xavier Claessens da72e6284e msubprojects: Revert back to rev-parse instead of --show-current
It is undocumented in manpage, but --show-current is new in git 2.22
which is too recent for distros we want to support like Ubuntu 18.04.
2020-09-18 03:01:15 +00:00
Xavier Claessens e0cd54a322 msubprojects: Stop trying to guess subproject type
It was done to include them in `meson subprojects foreach` without
--types argument, but it's better to special case missing --types and
include wraps that have type=None too. It was a bad idea because that
was messing them in `meson subprojects update`, now they are ignored by
that command.
2020-09-18 03:01:15 +00:00
Xavier Claessens c203e2f92b msubprojects: Add basic unit tests 2020-09-18 03:01:15 +00:00
Xavier Claessens 6fbf368fde msubprojects: Avoid useless "no local changes to save" message 2020-09-18 03:01:15 +00:00
Xavier Claessens ce347f2f8c msubprojects: Fix checkout of new tag/branch
If revision is a tag that does not exist locally, `git fetch origin
<revision>` won't create it and checkout will fail. Using --refmap
ensures that references exists locally.
2020-09-18 03:01:15 +00:00
Xavier Claessens 49b61e476f msubprojects: Fix --types default value 2020-09-18 03:01:15 +00:00
Nirbheek Chauhan faba48d853 backends: Treat build target as generator only when it's the first arg
Otherwise it might be an argument to a script that just inspects the
binary itself.
2020-09-17 22:25:37 +00:00
Nirbheek Chauhan 9b8ac9db32 project tests: Verify that UWP cross binaries use the right arch
This is a test for https://github.com/mesonbuild/meson/pull/7021, to
verify that `link.exe` uses the correct architecture when targeting
ARM64. Can be extended to other cross targets later.
2020-09-17 22:25:37 +00:00
Nirbheek Chauhan 946aeb6947 project tests: Also check whether introspect works 2020-09-17 22:25:37 +00:00
Nirbheek Chauhan 85d036ebbb Rename [properties] to [built-in options]
This is the new syntax. Avoids loud deprecation warnings.
2020-09-17 22:25:37 +00:00