Skip to content
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

Better check libzim version #1124

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Better check libzim version #1124

merged 1 commit into from
Sep 7, 2024

Conversation

kelson42
Copy link
Collaborator

@kelson42 kelson42 commented Sep 7, 2024

We check maximum version of libzim to avoid linking against a version which might have breaking changes.

@kelson42 kelson42 added this to the 14.0.0 milestone Sep 7, 2024
Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.44%. Comparing base (801b1df) to head (a3f5a65).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1124   +/-   ##
=======================================
  Coverage   41.44%   41.44%           
=======================================
  Files          59       59           
  Lines        4244     4244           
  Branches     2322     2322           
=======================================
  Hits         1759     1759           
  Misses        990      990           
  Partials     1495     1495           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42 kelson42 merged commit 3d95b38 into main Sep 7, 2024
17 checks passed
@kelson42 kelson42 deleted the better-libzim-version-check branch September 7, 2024 13:43
@@ -35,7 +35,9 @@ else
error('Cannot found header mustache.hpp')
endif

libzim_dep = dependency('libzim', version : '>=9.0.0', static:static_deps)
libzim_dep = dependency('libzim', version:'>=9.0.0', static:static_deps)
libzim_dep = dependency('libzim', version:'<10.0.0', static:static_deps)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this doesn't add a version requirement. It rather overrides the preceding one (so only version:'<10.0.0' stays in effect). Yes, the build will likely fail if libzim newer than 9.0.0 is not found, but then meson is allowed to pick up a version older than 10.0.0 (including a version lower than 9.0.0).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct way is to specify multiple restrictions: version:['>=9.0.0', '<10.0.0']

I am going to fix it in #1133

Copy link
Collaborator Author

@kelson42 kelson42 Sep 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, this approach has been validated on an other repo. by @mgautierfr. I don't remember the results of testing I made at that time... but AFAIK it tests the first one and tests then the second one... which is what we want.

@veloman-yunkan Do you have a better formalism in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants