meson/mesonbuild
Eli Schwartz 878c1604e6
handle meson_version even when the build file fails to parse
If the meson.build file is sufficiently "broken", even attempting to lex
and parse it will totally fail, and we error out without getting the
opportunity to evalaute the project() function. This can fairly easily
happen if we add new grammar to the syntax, which old versions of meson
cannot understand. Setting a minimum meson_version doesn't help, because
people with a too-old version of meson get parser errors instead of
advice about upgrading meson.

Examples of this include adding dict support to meson.

There are two general approaches to solving this issue, one of which
projects are empowered to do:

- refactor the project to place too-new syntax in a subdir() loaded
  build file, so the root file can be interpreted

- teach meson to catch errors in building the initial AST, and just load
  enough of the AST to check for meson_version advice

This implements the latter, allowing to future-proof the build
grammar.
2023-03-01 23:30:49 -05:00
..
ast refactor a few subsystem-relative imports that imported the wrong location 2023-02-28 15:46:53 -05:00
backend rust: Fix handling of proc-macros in rust-project.json 2023-03-01 20:56:53 +05:30
cmake cmake: check that `re.search` returned a non-None value 2023-02-13 13:30:06 -05:00
compilers Use caching in Compiler.sizeof() and Compiler.alignment() 2023-02-27 20:09:32 -05:00
dependencies python dependency: Fix typo in placeholder string 2023-02-27 07:03:30 -05:00
interpreter handle meson_version even when the build file fails to parse 2023-03-01 23:30:49 -05:00
interpreterbase handle meson_version even when the build file fails to parse 2023-03-01 23:30:49 -05:00
linkers treewide: add future annotations import 2023-02-01 17:01:30 -05:00
modules merge the python dependency from the python module into dependencies 2023-02-22 10:32:09 -08:00
scripts Add detection code for powerpc64le. 2023-02-28 20:24:51 +02:00
templates treewide: add future annotations import 2023-02-01 17:01:30 -05:00
utils handle more corner cases where locking the build directory fails 2023-02-19 12:28:33 -05:00
wrap wrap: ensure the tempfile used for downloading is closed 2023-02-13 09:09:10 -05:00
__init__.py
_pathlib.py pathlib: Patch pathlib to work around some bugs (fixes #7295) 2021-06-29 11:28:08 +02:00
_typing.py typing: replace ImmutableSetProtocol with typing.AbstractSet 2022-06-08 23:19:09 +03:00
arglist.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
build.py vala: don't build .h, .vala, and .gir if export_dynamic is False 2023-02-19 02:59:56 +05:30
coredata.py Add Compiler.cached_run() 2023-02-27 20:09:32 -05:00
depfile.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
envconfig.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
environment.py micro-optimize: define typing-only objects in TYPE_CHECKING 2023-02-01 17:01:30 -05:00
mcompile.py mcompile: Do not exclude targets from subprojects 2023-02-24 20:03:28 -05:00
mconf.py mconf: Use auto_features value for auto options 2023-02-07 03:24:48 -05:00
mdevenv.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
mdist.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
mesondata.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
mesonlib.py Move classes used by scripts to their own module 2022-09-28 19:36:13 -04:00
mesonmain.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
minit.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
minstall.py minstall: Replace non-breakable space with plain space in comment 2023-02-27 07:03:30 -05:00
mintro.py mintro: Add exclude_{files, dirs} to install_subdir install_plan 2023-02-27 07:03:30 -05:00
mlog.py micro-optimize: define typing-only objects in TYPE_CHECKING 2023-02-01 17:01:30 -05:00
mparser.py mparser: Add partial AST to exceptions 2023-03-01 23:28:43 -05:00
msetup.py msetup: clarify error message when wrong directories are specified 2023-02-28 09:10:15 -05:00
msubprojects.py be more explicit about asyncio usage 2023-01-04 16:46:52 -05:00
mtest.py mtest: fix annotaion of stdo_task and stde_task 2023-02-08 15:31:58 +05:30
munstable_coredata.py simplify instantiation of builtin type using builtins instead of functions 2023-02-01 17:01:30 -05:00
optinterpreter.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
programs.py treewide: add future annotations import 2023-02-01 17:01:30 -05:00
rewriter.py simplify instantiation of builtin type using builtins instead of functions 2023-02-01 17:01:30 -05:00