Repository navigation
feat: define the version macros in ppack.h - #13
Merged
Merged
Conversation
ppack_version.h was generated at configure time, so a copied-in header had no version. ppack.h now defines the macros, including a long PPACK_VERSION_NUMBER that cannot overflow a 16-bit int, and meson setup fails when they differ from project(version:). ppack_version.h stays installed as a deprecated header that includes ppack.h. The version block carries an inline Rule 2.5 deviation, because the library defines the macros for consumers and never uses them. Refs #12
5 tasks
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.
Summary
ppack.hdefinesPPACK_VERSION_MAJOR,_MINOR,_PATCH,PPACK_VERSION,PPACK_VERSION_STRINGand a newPPACK_VERSION_NUMBER(long,MAJOR * 10000 + MINOR * 100 + PATCH), so a copy-in build carries its version.meson.buildreads the header withfs.readand fails to configure when any macro differs fromproject(version:);meson_versionis now>=0.57.0. The generated template is removed.ppack_version.his a deprecated header that includesppack.h, installed beside it until the next major release.tests/test_edge.cincludesppack_version.hand checksPPACK_VERSION_NUMBERagainst its parts.docs/design.mdalready lists the public-macro 2.5 deviations.docs/api.mdgains a Version section with a compiled#ifexample; integration, AGENTS and CHANGELOG are updated.Checks run
meson testunder ASan and UBSan: 3/3, includingtest_version_macros.PPACK_VERSION_MINORset to 6 fails configure withinclude/ppack.h must define PPACK_VERSION_MINOR as 5.misch runandmisch deviations: clean.scripts/format.sh: clean.ppack_version.hand checking every macro compiles with gcc-Werrorand with cl2000 22.6.2 and 25.11.1--c11under COFF and EABI with--emit_warnings_as_errors. The g++ leg is skipped becauseppack_platform.huses_Static_assert, which is outside this change.Refs #12