SystemVersion cleanup (or the return of the explicit build number) in latest Pharo 7

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SystemVersion cleanup (or the return of the explicit build number) in latest Pharo 7

Torsten Bergmann
Hi,

as you all know Pharo 7 is built using sources from github and a new bootstrap process. The first Pharo 7 images [1]
unfortunately were hard to distinguish - the initial problem was described in [2]

Guille tried to address this by adding a build number again [3] but unfortunately he mixed it into the existing suffix
of the class SystemVersion. There was also some other trouble afterwards:
 
 - the highestUpdate was still not set by the bootstrap process, which made some code unloadable (like Artefact who's
   config is checking if it is above a certain update number)
 - with Guilles fix the build number had to be parsed from the suffix string
 - one was still not able to distinguish 32/64 bit images
 - the SystemVersion class and the according tests were still ugly
 
So I reviewed all this more deeply and cleaned SystemVersion as well as the tests while trying to stay as compatible
as possible. Thanks a lot to Pavel and Esteban who helped me sorting things out, especially in git and the bootstrap
process.

How does it look now
====================

  1. Our system type is still called "Pharo" ;)

      SystemVersion current type -> 'Pharo'

  2.  we still continue with major and minor versioning (leaving out patch versions), so currently work is done for Pharo 7.0

      SystemVersion current major -> 7
      SystemVersion current minor -> 0
      SystemVersion current majorMinorVersion -> 'Pharo7.0'

  3. the identification string now has a "+" sign inside to separate the build meta informations following
     the given rule 10 from http://semver.org
   
     So the full image version now looks like this:

      SystemVersion current imageVersionString -> 'Pharo-7.0+alpha.build.168.sha.30fc9bbe79922877706ecd842f8aef6822cdcdd9 (32 Bit)'  

  4. the suffix is currently "alpha" and may be changed depending on release status

      SystemVersion current suffix -> 'alpha'

  5. the build number is stored as an explicit ivar in SystemVersion now

      SystemVersion current build -> 168

     Note that the build number is explicitly set during the bootstrap process from the outside and increased over time with each new build.
     It represents the CI build number of #development branch now, see [4] on CI server

  6. the github SHA commit hash is accessible too:

       SystemVersion current commitHash -> '30fc9bbe79922877706ecd842f8aef6822cdcdd9'

     which corresponds in this case to the last commit in #development branch https://github.com/pharo-project/pharo/commit/30fc9bbe79922877706ecd842f8aef6822cdcdd9

  7. the version includes now also the 32/64 bit distinction:

          Pharo-7.0+alpha.build.168.sha.30fc9bbe79922877706ecd842f8aef6822cdcdd9 (32 Bit)
       or Pharo-7.0+alpha.build.168.sha.30fc9bbe79922877706ecd842f8aef6822cdcdd9 (64 Bit)

Additionally
============
  - the version is displayed in SystemReporter and the AboutBox (Screenshot attached), please use this to identify the image easily

  - the #highestUpdate is calculated dynamically with code in the image (but it is there only for compatibility reasons).

     SystemVersion current highestUpdate -> "70168"

    We might easily catch the 999 build mark now and then run into 71000 which might still be Pharo 7.0 instead of 7.1.
    (which means first two digits of update number will then NOT correspond to major/minor version anymore). So better avoid #highestUpdate
    as a meaningful number for loading code or other.

  - also note if you contribute with an own PR (in your own fork on github) the build number is the build number of you PR specific CI build.
    Once your PR is reviewed and merged it is the regular Pharo image build number again.

  - you can reuse SystemVersion for you own apps built on top of Pharo: "MyKillerApp-1.0+beta (64 Bit)" can be easily created with:

        (SystemVersion major: 1 minor: 0 suffix: 'beta')
        type: 'MyKillerApp';
             yourself
 
  - if you report a bug on bugs.pharo.org it would be good to note down the full version of the image you used as found in the
    About box. This allows to better reproduce wrong behavior that only happens in a specific image


Thanks
T.

[1] http://files.pharo.org/image/70/
[2] http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2017-August/130971.html
[3] http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2017-August/131015.html
[4] https://ci.inria.fr/pharo-ci-jenkins2/job/Test%20pending%20pull%20request%20and%20branch%20Pipeline/job/development/

version.png (178K) Download Attachment