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
version info on non-git builds & platforms with SSE support only? #1514
Comments
This otherwise prevents compilation on non x86 platforms (see #1514)
No problem, this one is not actually used for production code... Have a look at #1515, see if that fixes it for you. |
No need, but you've caught my interest now... What are we talking about? |
One more thing: I notice that many of these builds are failing due to failed dependencies. I assume this is related to Qt? If so, you may still be able to offer a command-line only build: just run |
And one more while I'm at it: it looks like the install runs from a download of the source code, rather than a git clone. The issue there is that the version information that gets baked into the executables is derived from |
not directly. But since I will be preparing the source tarball out of the git repo, we could generate a file with versioning information which could be picked up during build. Many projects have such a practice: $> grep export-subst */.gitattributes
cctools/.gitattributes:configure export-subst
dipy/.gitattributes:dipy/COMMIT_INFO.txt export-subst
nipy/.gitattributes:nipy/COMMIT_INFO.txt export-subst
nipype/.gitattributes:nipype/COMMIT_INFO.txt export-subst
nipype-master/.gitattributes:nipype/COMMIT_INFO.txt export-subst
pandas/.gitattributes:pandas/_version.py export-subst
pymvpa/.gitattributes:mvpa2/COMMIT_HASH export-subst
pynifti/.gitattributes:nibabel/COMMIT_INFO.txt export-subst
pynifti-localcopy/.gitattributes:nibabel/COMMIT_INFO.txt export-subst so, as inspired by good old CVS, we get e.g. for pandas: $> grep '$Format:' pandas/pandas/_version.py
git_refnames = "$Format:%d$"
git_full = "$Format:%H$" where it is placing refnames and hexsha inside Python variable right in the code. It would though cause a bit of difficulty in packaging (source tarball might have different expanded lines than I would have in the source tree which would be the git tree) but IIRC avoidable. $> cat pymvpa/mvpa2/COMMIT_HASH
$Format:%H$ |
oy... ok - two main ones
and then still that coolness factor like |
THANKS! Re "production" -- well, we already uploaded a "non production" version to debian unstable ;) $> git describe master
3.0_RC3-86-g4b523b413 and current master seems to be as non-production as the previous one: $> git describe origin/master
3.0_RC3-135-g2b8e7d0c2 so I think we will be fine ;) I will update packaging, and upload, so we will see! THANKS for quick replies! |
I've had a similar problem with the homebrew package where I had to manually clone and checkout our code into the homebrew repo (instead of simply setting a link to release code tarball) just to get the version string into the commands. How about we check for a file |
We do something like that in BIDS Apps. Better would be if a text file in the repo contained up-to-date version information, but that file was actually script-generated and CI verified correspondence. However I'm not sure that's possible given the generation of both commit hashes and tags occur after the commit.
We should be covered in that respect. Don't know to what extent it's been tested in recent times (I'm a bit concerned about envvar name mismatch; @jdtournier?), but we've been diligent to cover it off where relevant. |
This is to allow version information to be updated easily for packaging purposes (see #1514).
Yes, that's about as 'production' as we've managed so far. Although we do have actual tag releases (still as release candidates though). Trust me, we get a lot less 'production' than that...
Yes, I've heard about ARM chips being used for clusters - that's an interesting one to follow. The other reasons are a bit less appealing to me, but interesting nonetheless.
Well, we're covered in that we've thought about it, but we're not covered in that none of the testing operates on big-endian systems... While early versions of MRtrix were used on big-endian systems, it's been a (long) while. So there's every chance that bugs might be there and have gone undetected for quite some time. On that note, I think you might be onto something with the envvar name mismatch... Guess that should be Onto the version string issue:
The problem is if you want that file to store the commit SHA1, then you can't do that without knowing the commit SHA1 in the first place, since the SHA1 depends on the exact contents of the commit. So yes, we can store a version, but then it can't refer to the actual commit SHA1. Which also means:
Can't be done - same reason, as you guessed here. On top of that, the CI checks out a merge commit as would be pushed to the repo when the pull request is eventually merged, so it's not even the SHA1 of the commit you've pushed, but a different one again... This is why I ended up with the current strategy. Which leaves @yarikoptic's suggestion:
That actually sounds like the best plan. This is the bit that updates the version file ( Does that sound do-able...? |
Well, my recommendation was somewhat of a hybrid/in addition to above. What if you do have |
Based on discussion, suggestion to handle this:
Thoughts |
This otherwise prevents compilation on non x86 platforms (see MRtrix3#1514)
closed with #1593 |
Debian supports (way too ;)) many non x32 architectures, but builds there fail:
https://buildd.debian.org/status/package.php?p=mrtrix3&suite=sid
and quite often simply due to demand of the following header file for SSE support (available only for i386 and amd64)
before we go ahead and just blindly restrict architectures, I wondered to ask -- do you see it feasible to support non-SSE ones? I could outline potential benefits if you are interested ;)
The text was updated successfully, but these errors were encountered: