Repository navigation
Give the library its own version: spine::version(), summary() and spine-dump --version - #2
Merged
Merged
Conversation
…ne-dump --version project(spine-reader VERSION X.Y.Z) stays the only place the number is written. It reaches the code as the private compile definition SPINE_READER_VERSION_STRING, returned by the new spine::version() (spine/version.hpp, included by reader.hpp). SchemaReport::summary() now names both programs on the line after the path, so a model older than the file reads as a normal lag: SPINE 1.4.1, format_version 1 (V1); read by spine-reader 0.1.0 (model from SPINE 1.4.0) instead of "SPINE 1.4.1, format_version 1 (V1), read with model 1.4.0". SchemaReport keeps its layout. This line is the only change the CAFMakers' logs show. spine-dump --version prints the same pair and exits 0, whatever other arguments are given. The tests no longer write the spine-reader or model version as literals: test_reader.cpp builds them from spine::version() and SPINE_READER_MODEL_SPINE_VERSION. check_spine_dump.cmake gets them from tests/CMakeLists.txt, which reads the model version from model.hpp and reconfigures when that header is regenerated. The file versions in those strings describe the frozen test files and stay literal. The README gains a Versions section, and the EGM.md contracts describe the new function, the summary line and --version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of following SPINE releases: spine-reader gets a version of its own, so that "files from SPINE Y need spine-reader X" has an X to point at, and a job log shows which X read a file. After this is merged and CI passes on the merge commit,
v0.1.0can be tagged.What changes
One version source.
project(spine-reader VERSION 0.1.0)stays the only place the number is written. It reaches the library as a private compile definition, returned by the newspine::version()(include/spine/version.hpp, included byreader.hpp).SchemaReport::summary(): the line after the path now names both programs.A model older than the file now reads as a normal lag, not a mismatch.
SchemaReportkeeps its layout. This line is the only change the CAFMakers' logs show. SBN's A/B script, which compares standard output with a baseline, will need a new baseline once.spine-dump --versionprintsspine-dump: spine-reader 0.1.0 (model from SPINE 1.4.0)and exits 0, whatever other arguments are given.Tests:
test_reader.cppandcheck_spine_dump.cmakeno longer write the spine-reader or model version as literals.tests/CMakeLists.txtreads the model version frommodel.hpp, and reconfigures when the header is regenerated.spine_dump_outputalso checks--version.Docs: a Versions section in the README (tags made from
project(VERSION),ci/check_tag_version.sh,SameMinorVersion, nothing ever moved or deleted). TheEGM.mdcontracts describe the new function, the summary line and--version.Checked
-Wall -Wextra -Wpedantic. All ctest entries pass, andspine_reader_real_filesis skipped as designed.spine::version()deliberately returning a wrong string,spine_dump_outputfails. It passes again once restored.ci/sl7-ups.sh(SL7, UPS gcc 12, C++17, HDF5 1.12.2): 133 test cases and 108,844 assertions pass.