Skip to content

Give the library its own version: spine::version(), summary() and spine-dump --version - #2

Merged
pgranger23 merged 1 commit into
mainfrom
version/library-version
Nov 5, 2026
Merged

pgranger23 merged 1 commit into
mainfrom
version/library-version

Conversation

@pgranger23

Copy link
Copy Markdown
Collaborator

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.0 can 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 new spine::version() (include/spine/version.hpp, included by reader.hpp).

  • SchemaReport::summary(): the line after the path now names both programs.

    before:  SPINE 1.4.1, format_version 1 (V1), read with model 1.4.0
    after:   SPINE 1.4.1, format_version 1 (V1); read by spine-reader 0.1.0 (model from SPINE 1.4.0)
    

    A model older than the file now reads as a normal lag, not a mismatch. SchemaReport keeps 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 --version prints spine-dump: spine-reader 0.1.0 (model from SPINE 1.4.0) and exits 0, whatever other arguments are given.

  • Tests:

    • test_reader.cpp and check_spine_dump.cmake no longer write the spine-reader or model version as literals. tests/CMakeLists.txt reads the model version from model.hpp, and reconfigures when the header is regenerated.
    • spine_dump_output also 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). The EGM.md contracts describe the new function, the summary line and --version.

Checked

…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.
@pgranger23
pgranger23 merged commit 101e2db into main Nov 5, 2026
4 checks passed
@pgranger23
pgranger23 deleted the version/library-version branch November 5, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant