Skip to content
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

Versioning reform #4706

Merged
merged 1 commit into from
Jan 5, 2020
Merged

Versioning reform #4706

merged 1 commit into from
Jan 5, 2020

Conversation

mossheim
Copy link
Contributor

@mossheim mossheim commented Dec 28, 2019

Purpose and Motivation

this commit updates how versioning is communicated across the codebase.
the most important change is that SCVersion.txt now separates the
'patch' and 'tweak' version components in new CMake variables called
SC_VERSION_[MAJOR,MINOR,PATCH,TWEAK]. 'patch' is always numeric, while
'tweak' is the optional component used for '-beta1', '-rc2'. the old
variables are kept for backwards compatibility.

we use these to set the VERSION in the CMake call to project(), which
fixes #4648. however, this requires that we strip the 'tweak' component
since only digits and periods are allowed in version strings. so, we
replace references to PROJECT_VERSION with SC_VERSION where appropriate.

this also allows us to be more precise with versioning in the class
library. previously, we only had a method that would return the
".4-beta1" part of the version string, Main.scVersionPostfix. this
commit deprecates that method and replaces it with Main.scVersionPatch
and Main.scVersionTweak. now, we can also update Main.versionAtMost and
Main.versionAtLeast to check the patch version as well.

scsynth and supernova's /version.reply contents are kept the same for
backwards compatibility.

documentation added/updated for all affected methods.

testing checklist:

  • try re-configuring cmake multiple times to confirm CMake warnings #4648 is fixed
  • check that outputs of Main.version, Main.scVersionFoo commands are
    unchanged
  • check that scsynth and supernova replies to /version are unchanged

i have tested the above points and found no issues.

Types of changes

  • Documentation
  • Bug fix
  • New feature

To-do list

  • Code is tested - new tests for versionAtMost and versionAtLeast, but i can't think of any way to test scVersionMajor etc.
  • All tests are passing
  • Updated documentation
  • This PR is ready for review

@mossheim mossheim added comp: build CMake build system comp: class library SC class library comp: help schelp documentation labels Dec 28, 2019
this commit updates how versioning is communicated across the codebase.
the most important change is that SCVersion.txt now separates the
'patch' and 'tweak' version components in new CMake variables called
SC_VERSION_[MAJOR,MINOR,PATCH,TWEAK]. 'patch' is always numeric, while
'tweak' is the optional component used for '-beta1', '-rc2'. the old
variables are kept for backwards compatibility.

we use these to set the VERSION in the CMake call to project(), which
fixes #4648. however, this requires that we strip the 'tweak' component
since only digits and periods are allowed in version strings. so, we
replace references to PROJECT_VERSION with SC_VERSION where appropriate.

this also allows us to be more precise with versioning in the class
library. previously, we only had a method that would return the
".4-beta1" part of the version string, Main.scVersionPostfix. this
commit deprecates that method and replaces it with Main.scVersionPatch
and Main.scVersionTweak. now, we can also update Main.versionAtMost and
Main.versionAtLeast to check the patch version as well.

scsynth and supernova's `/version.reply` contents are kept the same for
backwards compatibility.

documentation added/updated for all affected methods.

tests added for Main.versionAtMost/Least

testing checklist:
- try re-configuring cmake multiple times to confirm #4648 is fixed
- check that outputs of Main.version, Main.scVersionFoo commands are
unchanged
- check that scsynth and supernova replies to /version are unchanged
@mossheim
Copy link
Contributor Author

ready for review. i've tested everything i listed above that's relevant to this PR, but there is probably more testing that could be done

Copy link
Member

@telephon telephon left a comment

Choose a reason for hiding this comment

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

looks good and all tests succeed

@dyfer
Copy link
Member

dyfer commented Jan 3, 2020

I also tested and can confirm that:

  • re-configuring CMake works and CMake warnings #4648 is fixed
  • outputs of Main.version, Main.scVersionFoo commands are
    unchanged
  • scsynth and supernova replies to /version are unchanged

@mossheim mossheim merged commit bcac8f3 into supercollider:develop Jan 5, 2020
@mossheim mossheim deleted the topic/version-reform branch January 5, 2020 20:43
@mossheim
Copy link
Contributor Author

mossheim commented Jan 5, 2020

just want to note, i anticipate that this will some way or another break something in the future in a way we haven't thought of.. it's too much editing of the build system for Murphy's law not to apply 😆 . i'll hold myself responsible for fixing that when it comes up.

@mossheim mossheim restored the topic/version-reform branch April 10, 2020 18:48
@mossheim mossheim deleted the topic/version-reform branch August 1, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: build CMake build system comp: class library SC class library comp: help schelp documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake warnings
3 participants