aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/coredata.py10
-rw-r--r--mesonbuild/interpreter/interpreter.py2
2 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index e1fa047..4bd1629 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -61,6 +61,16 @@ if T.TYPE_CHECKING:
# But the corresponding Git tag needs to be '0.1.0rc1'
version = '1.1.99'
+# The next stable version when we are in dev. This is used to allow projects to
+# require meson version >=1.2.0 when using 1.1.99. FeatureNew won't warn when
+# using a feature introduced in 1.2.0 when using Meson 1.1.99.
+stable_version = version
+if stable_version.endswith('.99'):
+ stable_version_array = stable_version.split('.')
+ stable_version_array[-1] = '0'
+ stable_version_array[-2] = str(int(version[-2]) + 1)
+ stable_version = '.'.join(stable_version_array)
+
backendlist = ['ninja', 'vs', 'vs2010', 'vs2012', 'vs2013', 'vs2015', 'vs2017', 'vs2019', 'vs2022', 'xcode', 'none']
DEFAULT_YIELDING = False
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 81a88e5..e97e670 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -526,7 +526,7 @@ class Interpreter(InterpreterBase, HoldableObject):
raise InterpreterException(f'Module returned a value of unknown type {v!r}.')
def handle_meson_version(self, pv: str, location: mparser.BaseNode) -> None:
- if not mesonlib.version_compare(coredata.version, pv):
+ if not mesonlib.version_compare(coredata.stable_version, pv):
raise InterpreterException.from_node(f'Meson version is {coredata.version} but project requires {pv}', node=location)
mesonlib.project_meson_versions[self.subproject] = pv