Skip to content

Fix edge-dependency CI failures - #1400

Open
willnet wants to merge 4 commits into
prawnpdf:masterfrom
willnet:fix-prawn-dev-edge-ci
Open

willnet wants to merge 4 commits into
prawnpdf:masterfrom
willnet:fix-prawn-dev-edge-ci

Conversation

@willnet

@willnet willnet commented Sep 8, 2026

Copy link
Copy Markdown

Fixed CI jobs that were failing due to dependencies on edge. Also updated actions/checkout and actions/cache to their latest versions.

On CI in my forked repository, the code-style job is failing because rubocop is at its latest version, but I haven't addressed this since fixing it would make the diff too large.

CI result is here.

When running edge tests in CI, the prawn-dev and prawn-manual_builder
dependencies are pulled from their GitHub repositories. Since both
prawn-dev and prawn-manual_builder have been bumped to newer versions
on GitHub, dependency resolution in the gemspec was failing. This
commit fixes the gemspec dependency constraints to resolve that.

Upgrading prawn-manual_builder also changed the generated PDF output,
so the expected hash value compared in spec/prawn_manual_spec.rb has
been updated accordingly.
When running edge tests in CI, the prawn-dev, prawn-manual_builder,
and ttfunk dependencies are pulled from their GitHub repositories.
If any of these dependencies introduce a change that affects the PDF
output verified in prawn_manual_spec.rb, the edge tests will
inevitably fail. Updating the expected hash to match edge would then
break the non-edge tests instead.

To avoid this, the checks in prawn_manual_spec.rb are now skipped
when running under edge dependencies.
Pinning `uri >= 1.0` in the gemspec broke Ruby versions old enough
that only an equally old Bundler is installable there (e.g. 3.0.0's
bundler 2.5.23): that Bundler can't safely replace a `uri` default
gem that's already been activated, so `bundle exec` itself now fails
with `Gem::LoadError: You have already activated uri 0.10.1, but your
Gemfile requires uri 1.1.1`, before any test code even runs.

Define URI::RFC2396_PARSER ourselves in spec_helper when it's missing
instead. On the older `uri` versions that lack it, URI::DEFAULT_PARSER
already *is* the RFC2396 parser (uri 1.0 repointed DEFAULT_PARSER to
RFC3986 and introduced RFC2396_PARSER as the explicit way to keep the
old behavior), so this is equivalent rather than a rough workaround,
and it sidesteps Bundler's default-gem activation rules entirely.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant