summaryrefslogtreecommitdiff
path: root/src/buildstream
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream')
-rw-r--r--src/buildstream/_project.py8
-rw-r--r--src/buildstream/_versions.py6
-rw-r--r--src/buildstream/data/projectconfig.yaml4
3 files changed, 16 insertions, 2 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index ceba4c44b..6ae8aa9db 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -39,6 +39,7 @@ from ._sourcefactory import SourceFactory
from .types import CoreWarnings
from ._projectrefs import ProjectRefs, ProjectRefStorage
from ._versions import BST_FORMAT_VERSION
+from ._versions import BST_FORMAT_VERSION_MIN
from ._loader import Loader
from .element import Element
from .types import FastEnum
@@ -590,6 +591,13 @@ class Project():
# Assert project's format version early, before validating toplevel keys
format_version = pre_config_node.get_int('format-version')
+ if format_version < BST_FORMAT_VERSION_MIN:
+ major, minor = utils.get_bst_version()
+ raise LoadError(
+ "Project requested format version {}, but BuildStream {}.{} only supports format version {} or above."
+ "Use latest 1.x release"
+ .format(format_version, major, minor, BST_FORMAT_VERSION_MIN), LoadErrorReason.UNSUPPORTED_PROJECT)
+
if BST_FORMAT_VERSION < format_version:
major, minor = utils.get_bst_version()
raise LoadError(
diff --git a/src/buildstream/_versions.py b/src/buildstream/_versions.py
index 2270bc05a..ad749865d 100644
--- a/src/buildstream/_versions.py
+++ b/src/buildstream/_versions.py
@@ -25,6 +25,12 @@
#
BST_FORMAT_VERSION = 25
+# The mimimum BuildStream format version supported
+#
+# This version is the minimum format version supported by the
+# current buildstream version
+#
+BST_FORMAT_VERSION_MIN = 18
# The base BuildStream artifact version
#
diff --git a/src/buildstream/data/projectconfig.yaml b/src/buildstream/data/projectconfig.yaml
index ee4055cf5..d84edbf92 100644
--- a/src/buildstream/data/projectconfig.yaml
+++ b/src/buildstream/data/projectconfig.yaml
@@ -4,8 +4,8 @@
# General configuration defaults
#
-# Require format version 0
-format-version: 0
+# Require format version 18
+format-version: 18
# Elements are found at the project root
element-path: .