From 8af144d30d3a743fa946e8579b85f7789b72e1ba Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 10 Apr 2019 19:46:47 +0900 Subject: Implement new required 'version' specification in project.conf This adds a required field to project.conf to specify the BuildStream version required by the project, and this serves two separate purposes at once: A.) It is a more practical method for users to specify the format-version The "format-version" field requires that users know about which format version each YAML feature was added in, and this version is separate from the BuildStream version. As such, it is more difficult to use - the field is still preserved and supported, but mostly only useful in order to depend on format versions in unstable release periods. B.) It serves to ensure that the wrong major point version of BuildStream is never used with the wrong project. Changes in this commit include: * _versions.py: Added BST_API_VERION_MAJOR and BST_API_VERION_MINOR These include comments about how the fields must be updated when work commences on any major or minor point stable release, usually on the master branch. * _project.py: Support parsing the new "version" * _frontend/app.py: The `bst init` command has been extended to also dump the current API version automatically. This should really be enhanced separately, but since the test cases use `bst init` in some places in order to create projects for test purposes, I've included the minimal change here and will enhance `bst init` separately. * tests: All tests updated to include a "version: 2.0" specification in the project.conf files under test --- tests/format/options/invalid-name-leading-number/project.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/format/options/invalid-name-leading-number/project.conf') diff --git a/tests/format/options/invalid-name-leading-number/project.conf b/tests/format/options/invalid-name-leading-number/project.conf index bb3e2ef6d..eee282539 100644 --- a/tests/format/options/invalid-name-leading-number/project.conf +++ b/tests/format/options/invalid-name-leading-number/project.conf @@ -1,4 +1,5 @@ name: test +version: 2.0 options: 123number_is_first: -- cgit v1.2.1