-
-
Notifications
You must be signed in to change notification settings - Fork 163
Relax version check to ignore micro versions #739
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
Conversation
|
ImageMagick does not follow semver, which means:
there is no concern about backwards compatibility if the ImageMagick
version is only newer by a micro version.
Unfortunately, yes there are.
I mean, the small changes that happen in ImageMagick 'patch' versions,
won't affect many users. But really whether a software package works or not
being indeterminate is 'highly sub-optimal'.
considering it forces a rebuild of php-imagick on every single minor
version change or it will print the warning message.
Doing a rebuild is the only way of making sure that nothing will break.
I would pretty strongly recommend that people who want to distribute
Imagick, package it with it's own version of ImageMagick, that is separate
from a package of ImageMagick that is used for command line tools.
While I am sympathetic to downstream software projects that package
Imagick, I think that downstream projects need to solve downstream problems
at the correct level, rather than pushing them 'upstream'.
And yes, I really wish that I had influence upstream to ImageMagick, and
could persuade them to follow semver with testing to prevent regressions.
But I don't.
Aaaaaaaaaaaargh,
Dan
Ack
…On Wed, 23 Jul 2025 at 23:25, Christian Pfeiffer ***@***.***> wrote:
As is, imagick complains if the ImageMagick version mismatches even
slightly. This means that while patches will not change the version, micro
changes to the ImageMagick version will cause this. There's a discussion at
Arch
<https://gitlab.archlinux.org/archlinux/packaging/packages/php-imagick/-/issues/3>
about this situation, considering it forces a rebuild of php-imagick on
every single minor version change or it will print the warning message.
Yet, upstream
<https://github.com/ImageMagick/ImageMagick/blob/main/m4/version.m4>
declares that changes to the micro part of the version are backwards
compatible:
3. MICRO version for added functionality in backwards compatible
manner, and
For this reason, Arch carries a patch
<https://gitlab.archlinux.org/archlinux/packaging/packages/php-imagick/-/blob/main/php-imagick-3.7.0-skip_version_check_by_default.patch?ref_type=heads>
to disable the version check by default, as the constant new micro versions
of ImageMagick do not interfere with the functionality yet require a
rebuilt lest the warning is shown.
It's obviously not great to have to change this behaviour, and so I
suggest this patch to relax the check: Instead of comparing the exact
version, this checks if the imagickVersion is newer by less than a minor
version, ignoring the micro part. php-imagick cannot immediately profit
from newer functionality by a micro change, and there is no concern about
backwards compatibility if the ImageMagick version is only newer by a
micro version.
------------------------------
You can view, comment on, or merge this pull request online at:
#739
Commit Summary
- d658adb
<d658adb>
Relax version check
File Changes
(1 file <https://github.com/Imagick/imagick/pull/739/files>)
- *M* imagick.c
<https://github.com/Imagick/imagick/pull/739/files#diff-11a53ee3341a315920a8f582c11ce3b990fd929a1fdfb742474a8a09f65ee3eb>
(2)
Patch Links:
- https://github.com/Imagick/imagick/pull/739.patch
- https://github.com/Imagick/imagick/pull/739.diff
—
Reply to this email directly, view it on GitHub
<#739>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALPTN2FNCBJCEKHCZBFNX33KADW3AVCNFSM6AAAAACCHEKLZWVHI2DSMVQWIX3LMV43ASLTON2WKOZTGI2TOOBYGIZTIMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It was somewhat my understanding that the changed description introduced in
Due to what I just wrote, I don't understand how recompilation would prevent any issues if the ABI does not change. Regressions introduced in ImageMagick itself would not be resolved by doing so if they're in the library itself. But of course, I'm writing this assuming the description cited is to be trusted. You would have much more experience with this subject than me or anyone downstream, and if you say experience has shown this versioning not to be trustworthy, then downstream will have to change their approach to packaging Imagick.
Absolutely, but as said, it was the understanding downstream that the SOVERSION and description in In this sense, the logic behind opening this PR was that either a) downstream's understanding was correct and then the check itself is not or b) downstream misunderstood why the strictness of that check was necessary, and then downstream needs to handle this differently. I'd also like to point out that it's not just Arch patching the versioning check by default, but Debian (and thus Ubuntu) and Fedora do the exact same thing. If this is indeed critical to leave intact, then this should probably be communicated more clearly, because as-is all major distros just disable the check, and having such a difference between upstream and downstream packages is not good for anyone. |
|
I remember @remicollet also mentioned somewhere that ImageMagick sometime breaks ABI in patch version IIRC. Might be also good to get his thoughts on this. |
Yes IM is terrible at breaking things even in patch level (4th digit) But when this happens, I report it and ask them to bump soname and bump to higher level ; at leat the 3rd digit (semver requires a 1st digit bump) BTW in Fedora, we have On each new IM version I'm used to run imagick build and test
So this allow to detect early unexpected changes (ex: issue #737 ) in ABI (tests), API (build) and behavior. When needed the repository provides packages built with the new version. |
It was my understanding from reading But for the 3rd digit, from my understanding, an ABI change should only be possible if something slipped through and no SOVERSION bump took place - which should then be corrected anyway. And it would appear that all major distributions disable this check anyway and rely on the soname. |
|
For memory
|
Perhaps a simple way is to disable the check on Linux, as it is mostly there for Windows where there is no soname See #740 |
|
Oof, that's a mess. The definitions to Even for Windows, the check won't be all that useful if those breakages happen mostly during patch releases, I suppose? |
|
@TharathielCB simply set |
|
I'm going to close this in favour of #740 |

As is, imagick complains if the ImageMagick version mismatches even slightly. This means that while patches will not change the version,
microchanges to the ImageMagick version will cause this. There's a discussion at Arch about this situation, considering it forces a rebuild ofphp-imagickon every single minor version change or it will print the warning message.Yet, upstream declares that changes to the
micropart of the version are backwards compatible:For this reason, Arch carries a patch to disable the version check by default, as the constant new micro versions of ImageMagick do not interfere with the functionality yet require a rebuilt lest the warning is shown.
It's obviously not great to have to change this behaviour, and so I suggest this patch to relax the check: Instead of comparing the exact version, this checks if the
imagickVersionis newer by less than aminorversion, ignoring themicropart.php-imagickcannot immediately profit from newer functionality by amicrochange, and there is no concern about backwards compatibility if the ImageMagick version is only newer by amicroversion.