Skip to content

Cleanup versioning strategy #989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2019
Merged

Cleanup versioning strategy #989

merged 3 commits into from
Jul 22, 2019

Conversation

baylesj
Copy link
Contributor

@baylesj baylesj commented Jul 17, 2019

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

#988

@baylesj baylesj requested review from BillyDonahue and hjmjohnson and removed request for BillyDonahue July 17, 2019 20:01
baylesj added 2 commits July 17, 2019 13:05
Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.
@baylesj
Copy link
Contributor Author

baylesj commented Jul 17, 2019

Failures are due to us overusing resources. I guess I'll wait?

Submit files (using https)
   Using HTTP submit method
   Drop site:https://my.cdash.org/submit.php?project=jsoncpp
   Submission failed: Maximum number of builds reached for jsoncpp.  Contact [email protected] for support.
   Submit failed, waiting 5 seconds...
   Retry submission: Attempt 1 of 3

@baylesj baylesj force-pushed the cleanup-versioning branch from 082e37f to f300478 Compare July 17, 2019 20:07
@baylesj baylesj requested a review from BillyDonahue July 17, 2019 20:07
@baylesj
Copy link
Contributor Author

baylesj commented Jul 17, 2019

#734

Copy link
Contributor

@BillyDonahue BillyDonahue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we could write a little textfile off to the side containing nothing but the VERSION=x.y.z and maybe SOVERSION=n, and have all the builders pick that up in their own way.
Surely that's possible.

I do see this as an improvement in the meantime.

((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
(JSONCPP_VERSION_PATCH << 8))

#ifdef JSONCPP_USING_SECURE_MEMORY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this stuff about JSONCPP_USING_SECURE_MEMORY ?
It has nothing to do with version.
Actually JSONCPP_VERSION_HEXA and JSONCPP_VERSION_STRING are derivatives and should be elsewhere. I would like it if version.h were just the number tuple and that's about it.

# 2. /include/json/version.h
# 3. /CMakeLists.txt
# IMPORTANT: also update the SOVERSION!!
VERSION 1.9.2 # <major>[.<minor>[.<patch>[.<tweak>]]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake's file command can read a variable from a file.

file (STRINGS "version.txt" JSONCPP_VERSION)
file (STRINGS "soversion.txt" JSONCPP_SOVERSION)

I don't know how to do it in meson.
I guess a worst-case would be invoking cat.

r = run_command('cat','version.txt')
JSONCPP_VERSION=r.stdout()

r = run_command('cat','soversion.txt')
JSONCPP_SOVERSION=r.stdout()

I don't know meson. It feels like we should be able to do this though!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll spend some time this week looking into that, I definitely agree with you.

@baylesj baylesj merged commit 12325b8 into master Jul 22, 2019
@baylesj baylesj deleted the cleanup-versioning branch July 22, 2019 22:25
baylesj added a commit that referenced this pull request Jul 31, 2019
baylesj added a commit that referenced this pull request Jul 31, 2019
baylesj added a commit that referenced this pull request Jul 31, 2019
* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
baylesj added a commit that referenced this pull request Aug 14, 2019
* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
dota17 pushed a commit to dota17/jsoncpp that referenced this pull request Aug 19, 2019
* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
dota17 pushed a commit to dota17/jsoncpp that referenced this pull request Aug 19, 2019
dota17 pushed a commit to dota17/jsoncpp that referenced this pull request Aug 19, 2019
…-source-parsers#997)

* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
res2k pushed a commit to res2k/jsoncpp that referenced this pull request Aug 21, 2019
* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
res2k pushed a commit to res2k/jsoncpp that referenced this pull request Aug 21, 2019
res2k pushed a commit to res2k/jsoncpp that referenced this pull request Aug 21, 2019
…-source-parsers#997)

* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
dawesc pushed a commit to EFTlab/jsoncpp that referenced this pull request Sep 25, 2019
* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
dawesc pushed a commit to EFTlab/jsoncpp that referenced this pull request Sep 25, 2019
dawesc pushed a commit to EFTlab/jsoncpp that referenced this pull request Sep 25, 2019
…-source-parsers#997)

* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....
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.

2 participants