i built freecad on macos from this commit using a hacked together formula file i put together, and i'm able to run freecad from a cli, and spawn a gui version of freecad, however i noticed when i open the about dialog it is showing a revision number of 14555 see don't mind that error about the part stuff, i need to recompile and build against the new opencascade version that i just installed ie. 7.5.0, this version of freecad was built against 7.4.0
anyways if anyone knows why i would not be getting an update revision number i'd gladly like to know.
[SOLVED] build revision number not incrementing when compiling from latest master
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[SOLVED] build revision number not incrementing when compiling from latest master
Last edited by ipatch on Tue Dec 29, 2020 11:10 pm, edited 1 time in total.
Re: build revision number not incrementing when compiling from latest master
My guess is that your shallow clone messes up things. My bet is that commit 14555 is the current reference for the commit counting mechanism.
Re: build revision number not incrementing when compiling from latest master
openBrain,openBrain wrote: ↑Mon Nov 09, 2020 3:05 pm Bingo ! => https://github.com/FreeCAD/FreeCAD/blob ... ev.py#L264
thanks for pointing to that line, and i did notice that as well when grepping through the source. and i did recompile freecad against opencascade 7.5.0 but still see the same revision number ¯\_(ツ)_/¯ after building. so why would the versions i have been downloading from on the releases tab show a different revision number if their building against a similar commit?
i did some git stuff within the repo and noticed their are 22961 total commits as of
Code: Select all
9b5eb774
then checking how many commits from the link you posted there seems to be a total of 18126 commits, thus producing a difference of 4835.
my python knowledge is limited so not exactly sure how that py file / script gets executed during the build process.
any further clarification on this issue would greatly be appreciated.
and i did manage to update my formula file to not do a shallow clone when building freecad
Re: build revision number not incrementing when compiling from latest master
okay i think i have this dialed in now. i put together a cask of freecad the other day creating a cask / formula file that can be installed using the typical brew cask install and then submitted the cask upstream to homebrew-cask-versions, they merged in the cask and the pre release of freecad can be installed using
popped that version open, saw a revision number of 22894 with a hash 9eb080488d9
then checked out that specific commit in the freecad source
and the total num of commits on the master brach
22894
the revision number appears to be the total num of commits on the master branch, which if your building against master ...not sure if that py script works against master or if a specific commit id needs to be checked out, haven't looked to see travis and conda, are checking out a specific commit id, which would explain why my revision number did not increment.
i'm going update my formula to a specific commit id, and see if that changes anything.
Code: Select all
brew cask install freecad-pre
then checked out that specific commit in the freecad source
and the total num of commits on the master brach
Code: Select all
git rev-list --count HEAD
the revision number appears to be the total num of commits on the master branch, which if your building against master ...not sure if that py script works against master or if a specific commit id needs to be checked out, haven't looked to see travis and conda, are checking out a specific commit id, which would explain why my revision number did not increment.
i'm going update my formula to a specific commit id, and see if that changes anything.
Last edited by ipatch on Mon Nov 09, 2020 6:42 pm, edited 1 time in total.
Re: build revision number not incrementing when compiling from latest master
When compiling locally, to determine commit count, build process doesn't rely on the Internet but on local information.
Thus it basically takes the git log and counts how many new commits has been done since a known reference commit.
The reference commit (as shown by the line I pointed above) is currently the 14555th.
Because of the shallow clone, I assume that the commit 14555 is too old and not present in your log, thus build process can't determine properly the current count and thus use the "default" number 14555.
Edit : Command run to determine commit count and the case in which you're falling because of the shallow
Re: build revision number not incrementing when compiling from latest master
SOLVED
i managed to recompile freecad yesterday from the formula i managed to cobble together, and sure enough the revision number incremented from the initial 14555 as seen in the picture below.
i believe adding, shallow to the following line aided in resolving my issue.
https://github.com/ipatch/homebrew-us-0 ... 99dbc544R9
i managed to recompile freecad yesterday from the formula i managed to cobble together, and sure enough the revision number incremented from the initial 14555 as seen in the picture below.
i believe adding, shallow to the following line aided in resolving my issue.
https://github.com/ipatch/homebrew-us-0 ... 99dbc544R9