-
Notifications
You must be signed in to change notification settings - Fork 26
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
Don't request a version of podio in find_package(podio)
#203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just bump it to 1
? I would like to have this information also in the package sources directly, not only in spack.
I see a few reasons why I don't like having the version after seeing what happens. One is that we end up never updating it, because probably this won't build with 0.16.3 but no one is building with that so in the end it's doing nothing. Then, we can bump it to 1 but it builds fine with previous versions so we are introducing a version dependency when there isn't one. And also cmake decides when these are not compatible so we may have the same issue when going from version 1 to 2 multiplied by the number of packages that require version 1. |
We could define a version range |
The lower bound is the current way, or am I not understanding something? I still think we should not use the version numbers as we do in most places. The only gain is that it will fail fast when building older versions and the downside is having to modify in every package the version requirement when there are (or cmake decides there are) incompatibilities (every major version bump?). Then the spack recipes should be the only source of truth for versions, as in the end it becomes a stale number (so useless, and wrong). |
No, I don't think so (but I might just be misunderstanding CMake documentation once again). IIUC, currently it goes into its default search mode which is: same major version, and >= minor and patch version. However, I can't find that in the documentation at the moment. I think the range would allow us to specify a range of versions to work with, but then we would probably also have to change the compatibility mode in podio. (As per this documentation). Having said all that, I think the real issue in this case is probably the podio config: Technically that is correct though from a podio perspective. Not sure there is an easy solution in this case. It looks like the whole thing is not completely designed to easily handle Either we drop it, or we bump it to 1.0 (even if things build with older versions) would be my suggestions. Bumping it to 1.0 would have the benefit of making people move to that if they build this outside of spack. |
Technically, based on that documentation and since typically our packages have been so far packages that don't guarantee backwards compatibility I see the point to make people to move to 1.0, however a setup in which you keep updating |
I'd like to (strongly) suggest keeping the lower version (as I've expressed on the DD4hep issue as well; I think the solution there is one what would work here as well). Removing any minimum version is a bit of a lazy approach on the part of the developers, and it leaves it up to software librarians and packagers (in spack upstream, but also in key4hep-spack) to figure out what works and what doesn't. Those versions in spack do not appear there just by accident but based on what is in the CMakeLists.txt :-) We also aren't all able to upgrade the same components at the same time. At EIC we can't switch to podio v1.0 yet, but we do benefit from updates to the other packages as they are updated.
I think that's an actionable part here: it would make sense to build and unit test against the minimum versions in CI. |
I think in this case the only thing that we can really do find_package(podio)
if (NOT podio_VERSION VERSION_GREATER_EQUAL 0.16.3)
message(FATAL "Need at least podio v0.16.3)
endif() |
Maybe like in DD4hep AIDASoft/DD4hep#1280 |
But this is exactly what has been happening, 0.16.3 is from more than one year ago so having it there hasn't helped at all in the last year. I'm not against having the numbers but breaking builds; if what people really want is to use it as a lower bound then I think the solution presented by Thomas is fine, fail if lower than the bound but don't fail just because podio upgraded to 1.0. Then we can just simply change the I'll merge this PR today so that we can have nightlies tomorrow. |
I think we can do as it is proposed in this PR, but before the next release / tag we should probably either figure out which minimal version of podio still works (because I doubt 0.16.3 is it) or simply bump to 1.0 before that. |
I found that these changes are more convenient like in DD4hep, because then multiple repos can be built at the same time with CMake in case we want to support that in the future... |
@jmcarcell Please update the release notes to reflect the actual change. |
cmake has decided that the version 1.0.0 of podio is not compatible with 0.16.3 and fails at
find_package(podio)
.BEGINRELEASENOTES
ENDRELEASENOTES