aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-02-26 01:36:47 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-03-01 23:30:49 -0500
commit878c1604e6348f98602bbdd16d92fc63ed15ebea (patch)
treeb2d351ce888291cacb11dcce34178e69fd4c8891 /docs/markdown/snippets
parentcc23996266846890fea708a7eb5dcff66d44c8b6 (diff)
downloadmeson-878c1604e6348f98602bbdd16d92fc63ed15ebea.zip
meson-878c1604e6348f98602bbdd16d92fc63ed15ebea.tar.gz
meson-878c1604e6348f98602bbdd16d92fc63ed15ebea.tar.bz2
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.
Diffstat (limited to 'docs/markdown/snippets')
0 files changed, 0 insertions, 0 deletions