Repository navigation
poppler: fix mat2 build on Darwin by backporting upstream bugfix - #546126
Conversation
|
My bad; I underestimated the rebuild time and thought it would be a quick rebuild locally and push. One sec |
Review dismissed automatically
|
I think the title should mention the derivation you touch, not the one that has the downstream effect. |
| package = finalAttrs.finalPackage; | ||
| }; | ||
| } | ||
| // lib.optionalAttrs (!minimal) { |
There was a problem hiding this comment.
This looks like a change that should be separate from the one that fixes the darwin issue. (Separate PR or commit?)
There was a problem hiding this comment.
It surfaces the same error through poppler's test suite that mat2 bumbles into so I thought it sensible to group them personally
There was a problem hiding this comment.
I get it. But it arguably belongs to a separate commit (in this same PR).
| # packages catch and confusing results where test seem to pass in nixpkgs but not outside | ||
| # of them | ||
| glib = finalAttrs.finalPackage.overrideAttrs (old: { | ||
| pname = "${old.name}-tests"; |
There was a problem hiding this comment.
$ nix build --file . poppler.passthru.tests.glib -L
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error:
… while evaluating the 'name' attribute of a derivation
… while evaluating a branch condition
at /Users/ihrachyshka/src/nixpkgs/lib/strings.nix:2911:5:
2910| # First detect the common case of already valid strings, to speed those up
2911| if stringLength string <= 207 && okRegex string != null then
| ^
2912| unsafeDiscardStringContext string
… in the left operand of the AND (&&) operator
at /Users/ihrachyshka/src/nixpkgs/lib/strings.nix:2911:35:
2910| # First detect the common case of already valid strings, to speed those up
2911| if stringLength string <= 207 && okRegex string != null then
| ^
2912| unsafeDiscardStringContext string
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'name' missing
at /Users/ihrachyshka/src/nixpkgs/pkgs/development/libraries/poppler/default.nix:214:20:
213| glib = finalAttrs.finalPackage.overrideAttrs (old: {
214| pname = "${old.name}-tests";
| ^
215| buildInputs = old.buildInputs ++ [ gtk3 ];
Did you mean pname?
| pname = "poppler-${suffix}"; | ||
| version = "26.06.0"; # beware: updates often break cups-filters build, check scribus too! | ||
| # beware: updates often break cups-filters build, check scribus too! inkscape also seems to need | ||
| # special handling for poppler versions, and the current upstream release also breaks it because |
There was a problem hiding this comment.
Current is too vague. Specfify the version of poppler and the version of inkscape?
There was a problem hiding this comment.
This is copying the style of the existing comments because Inkscape already has one patch to it to get it working with Poppler and I do not know if this incoming patchset, which breaks the current build, is indicative of a pattern of Inkscape not working with the latest Poppler versions or one-off
There was a problem hiding this comment.
poppler often changes the C++ API in a way that breaks consumers. This is the list of packages we noticed are typically affected. Not each poppler version update breaks all of these but usually some subset is affected on most bumps, depending on what API they use.
There was a problem hiding this comment.
Actually, we started adding them to passthru.tests so maybe just make this comment refer to that.
There was a problem hiding this comment.
(Opinion) If the concern is only about build failures, and we already collect everything relevant in passthru.tests, it's not clear what the value the current (or edited) comment here delivers: contributors and committers (are supposed to) run those when they touch the package. Personally, I'd just remove the comment.
|
graphite2 seems flakey, it keeps popping a timeout for at least one of linebreak, clusters, and featuremaptest by them running a hair over 3 seconds; I doubt it's related to this change |
05a6d99 to
d7a3714
Compare
There was a problem hiding this comment.
I can confirm the patch fixes the test suite failure, and one can run the new passthru test. I have a few minor comments on splitting the change into separate commits and tightening comments etc. but nothing of huge substance. I still think it's worth addressing at least some vagueness in current version of comments before merge though.
Thanks for the patch.
| pname = "poppler-${suffix}"; | ||
| version = "26.06.0"; # beware: updates often break cups-filters build, check scribus too! | ||
| # beware: updates often break cups-filters build, check scribus too! inkscape also seems to need | ||
| # special handling for poppler versions, and the current upstream release also breaks it because |
There was a problem hiding this comment.
(Opinion) If the concern is only about build failures, and we already collect everything relevant in passthru.tests, it's not clear what the value the current (or edited) comment here delivers: contributors and committers (are supposed to) run those when they touch the package. Personally, I'd just remove the comment.
| package = finalAttrs.finalPackage; | ||
| }; | ||
| } | ||
| // lib.optionalAttrs (!minimal) { |
There was a problem hiding this comment.
I get it. But it arguably belongs to a separate commit (in this same PR).
mat2 fails due to a bug in upstream Poppler now fixed, but bumping the version number breaks Inkscape which seems historically fiddly, so I just backported that commit which comes in clean.
Resolves: #546115
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.