Leo's self reported and Pip's reported version numbers should agree with each other and they don't. A chicken and egg problem. Part of this is because pip doesn't have (guaranteed) access to Git.
> leo-m --version
Leo 6.0-b2-devel, devel branch, build cecd3edb41
2019-07-24 17:40:09 -0500
> pip show leo
Name: leo
Version: 6.0b1.dev103
leo-m --version returns version var from leoversion.py (a static string), plus some other info if available:
leoGlobals.py g.getGitVersion(), which is parsed from git log -n 1setup.py (and thus pip) version is built from g.gitDescribe(), which is parsed from git describe.$ leo-m --version
Leo 6.0-b2-devel, devel branch, build 72128bce61
2019-07-24 11:00:48 -0500
$ git log -n 1 --date=iso
commit 72128bce61ed79d453a161d89d78fb86d3b56d20 (HEAD -> devel, origin/devel)
Author: Edward K. Ream <edreamleo@gmail.com>
Date: 2019-07-24 11:00:48 -0500
Fixed #1257 and removed disabled code
$ git describe --long --tags
v6.0b1-110-g72128bce6
Mismatches:
Git describe returns different version tag from the static version in leoversion.py. Why?
...because the workflow is:
v6.0-b1 (a master branch release) [b1d9a0e]v6.0-b1-rel [445dfa1]v6.0-b2-devel to reflect that "we're now working on the next version" [84afef0]Leo self reports version from "3. Initiate dev". Git reports from it's tag log, which doesn't know about step 3. Put another way, Leo is forward looking and git is backward looking.
So is all that's needed is to add:
v6.0-b2-dev in devel branch?I'm not sure it fits, because of the backward looking nature. ...still thinking...
[many git-reading hours later]: yes, I think this is a good idea. At the cost of adding yet-another-step for the human in the Creating a Release workflow.
-matt
Engineering notebook post about "Harmonize Leo and Pip version numbers #1242". Much of this opening post to mailing list is copied from the issue description. I realized it's better to have the "thinking out loud" parts in the mailing list, where people can chime in more easily,
So is all that's needed is to add:
- create git tag for
v6.0-b2-devin devel branch?I'm not sure it fits, because of the backward looking nature. ...still thinking...
[many git-reading hours later]: yes, I think this is a good idea. At the cost of adding yet-another-step for the human in the Creating a Release workflow.
Feel free to update the checklist in leoDist.leo, if you have not already done so. It would be a good idea to explain why this step is necessary. In other words, don't rely on my memory ;-)
> pip show leo
Name: leo
Version: 6.0b1.dev103
> python setup.py --version
Creating entry_points for [OS name - system]: nt - Windows
c:\tools\miniconda3\envs\leo-dev\lib\site-packages\setuptools\dist.py:470: UserWarning: Normalizing '6.0b1-dev112' to '6.0b1.dev112'
normalized_version,
6.0b1.dev112