Skip to content

chore(deps): update dependency thirdparty/mupdf to v1.28.0 - #687

Merged
OGKevin merged 3 commits into
masterfrom
renovate/mupdf
Jul 13, 2026
Merged

chore(deps): update dependency thirdparty/mupdf to v1.28.0#687
OGKevin merged 3 commits into
masterfrom
renovate/mupdf

Conversation

@renovate

@renovate renovate Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
thirdparty/mupdf minor 1.27.21.28.0

Release Notes

ArtifexSoftware/mupdf (thirdparty/mupdf)

v1.28.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added automated Opened by an automated bot or workflow dependencies Pull requests that update a dependency file Thirdparty labels Jul 12, 2026
@renovate
renovate Bot requested a review from OGKevin July 12, 2026 18:07
@github-project-automation github-project-automation Bot moved this to Backlog in Cadmus Jul 12, 2026
@renovate
renovate Bot temporarily deployed to cloudflare-pages-preview July 12, 2026 18:11 Inactive
@renovate
renovate Bot force-pushed the renovate/mupdf branch 2 times, most recently from ec5c165 to 9ffab10 Compare July 12, 2026 18:31
@renovate
renovate Bot temporarily deployed to cloudflare-pages-preview July 12, 2026 18:36 Inactive
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 13, 2026
@renovate

renovate Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@OGKevin
OGKevin enabled auto-merge (squash) July 13, 2026 12:31
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 12:35 — with GitHub Actions Inactive
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 18:07 — with GitHub Actions Inactive
@OGKevin
OGKevin disabled auto-merge July 13, 2026 18:26
@OGKevin

OGKevin commented Jul 13, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

MuPDF is upgraded from 1.27.2 to 1.28.0 across submodule, build, and exported version references. Shared MuPDF make libs arguments and WebP flags are centralized for native and Kobo builds. Native dependency builds now use separate cache directories and marker-aware rebuilds. Kobo cache validation is parameterized for testing, while marker comparison logic and coverage are expanded.

Possibly related PRs

Suggested reviewers: ogkevin

Poem

MuPDF climbs to twenty-eight,
While build flags neatly congregate.
Kobo markers guard the gate,
Native caches validate.
Fresh artifacts celebrate! 🚀

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits and accurately describes the MuPDF dependency version bump.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/build-deps/src/build/native.rs (1)

556-576: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

The two "cache not complete" tests don't isolate their claimed condition.

native_cache_complete_false_when_marker_stale_but_libmupdf_a_exists and native_cache_complete_false_when_artifacts_missing never set up a libwebp directory or marker. Since native_cache_complete_at short-circuits on markers::is_built(git_root, &libwebp_dir, "thirdparty/libwebp") first, both assertions pass simply because libwebp isn't built — not because of the specific mupdf marker/artifact condition each test name claims to exercise. If the mupdf-specific logic being tested were broken, these tests would still pass.

Set up a valid libwebp marker (as done in native_cache_complete_true_when_fresh) in both tests so only the intended mupdf condition varies.

♻️ Suggested fix
     #[test]
     fn native_cache_complete_false_when_marker_stale_but_libmupdf_a_exists() {
         let git_root = workspace_root();
         let artifact_root = artifact_tempdir();
         let fixture = NativeMupdfFixture::new(artifact_root.path());
+        let libwebp_dir = build_root(artifact_root.path()).join("libwebp");
+        std::fs::create_dir_all(&libwebp_dir).unwrap();
+        markers::mark_built(git_root, &libwebp_dir, "libwebp", "thirdparty/libwebp").unwrap();
         std::fs::write(markers::built_marker_path(&fixture.mupdf_dir), FAKE_SHA).unwrap();

         assert!(!native_cache_complete_at(git_root, artifact_root.path()));
     }

     #[test]
     fn native_cache_complete_false_when_artifacts_missing() {
         let git_root = workspace_root();
         let artifact_root = artifact_tempdir();
         let fixture = NativeMupdfFixture::new(artifact_root.path());
+        let libwebp_dir = build_root(artifact_root.path()).join("libwebp");
+        std::fs::create_dir_all(&libwebp_dir).unwrap();
+        markers::mark_built(git_root, &libwebp_dir, "libwebp", "thirdparty/libwebp").unwrap();
         markers::mark_built(git_root, &fixture.mupdf_dir, "mupdf", "thirdparty/mupdf").unwrap();
         std::fs::remove_file(fixture.mupdf_dir.join("build/release/libmupdf.a")).unwrap();

         assert!(!native_cache_complete_at(git_root, artifact_root.path()));
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/build-deps/src/build/native.rs` around lines 556 - 576, Update
native_cache_complete_false_when_marker_stale_but_libmupdf_a_exists and
native_cache_complete_false_when_artifacts_missing to create a valid libwebp
build marker using the same setup as native_cache_complete_true_when_fresh
before asserting. Keep each test’s mupdf-specific condition as the only varying
factor.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/build-deps/src/build/native.rs`:
- Around line 117-134: Update native_cache_complete_at to verify libwebp’s built
artifacts in addition to its marker: require src/.libs/libwebp.a and the
src/.libs and src/demux/.libs directories under libwebp_dir. Preserve the
existing MuPDF checks and return true only when all required artifacts exist.

---

Nitpick comments:
In `@crates/build-deps/src/build/native.rs`:
- Around line 556-576: Update
native_cache_complete_false_when_marker_stale_but_libmupdf_a_exists and
native_cache_complete_false_when_artifacts_missing to create a valid libwebp
build marker using the same setup as native_cache_complete_true_when_fresh
before asserting. Keep each test’s mupdf-specific condition as the only varying
factor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d1d34da9-1b0d-4a13-8615-d2d59b8c8f44

📥 Commits

Reviewing files that changed from the base of the PR and between 79c2cd6 and a7b0667.

📒 Files selected for processing (10)
  • .gitmodules
  • build-scripts/mupdf/kobo.patch
  • crates/build-deps/src/build/kobo.rs
  • crates/build-deps/src/build/kobo/mupdf.rs
  • crates/build-deps/src/build/mupdf.rs
  • crates/build-deps/src/build/native.rs
  • crates/build-deps/src/markers.rs
  • crates/build-deps/src/versions.rs
  • crates/core/src/document/mupdf_sys.rs
  • thirdparty/mupdf
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
crates/core/**/*.rs

📄 CodeRabbit inference engine (crates/core/REVIEW.md)

crates/core/**/*.rs: Do not use "string literal".to_string() or format!("literal") for user-visible text.
The fl! macro must be used at every call site for user-visible text.

crates/core/**/*.rs: All handle_event and render methods in view components must use the specified OpenTelemetry #[cfg_attr(feature = "tracing", tracing::instrument(...))] instrumentation.
Instrumentation skip() names must exactly match the method parameter names, including underscore prefixes.
Verify tracing instrumentation with cargo check --features tracing.
A view's render() is called only when it has no children or is a background view; container views with children are not rendered directly.
For container decoration, use a background view for content rendered before children, or a dedicated child view for overlays rendered in child order.
Rustdoc examples should prefer fully compilable examples, then no_run, and use ignore only for private or pub(crate) items unreachable from the test harness, with an explanatory comment.
Use # to hide Rustdoc example boilerplate and verify examples with cargo test --doc.
Use typed SQLx macros: sqlx::query!, sqlx::query_as!, and sqlx::query_scalar!; do not use untyped query functions.
Use .flatten() on query_scalar! results for nullable columns producing Option<Option<T>>.
Untyped SQLx queries are permitted for dynamic SQL only when unit tests cover every dynamic path and a comment explains why a typed macro cannot be used.
All user-visible strings must use fl! with use crate::fl;; do not hardcode labels, buttons, placeholders, notifications, or other user-facing text.
Pass Fluent variable values at call sites using fl!("id", var = value).
Apply localization to SettingKind labels, Event::OpenNamedInput labels, menu entry text, button labels, notification text, and all other user-visible strings.

Files:

  • crates/core/src/document/mupdf_sys.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: The emulator code path should panic on errors, while the app code path should handle errors gracefully.
Prefer ? over unwrap() or expect() in library and app Rust code.
Use thiserror for custom error types and anyhow for ad-hoc errors.
Prefer iterators over index-based loops.
Use &str instead of String in function parameters when ownership is not needed.
Prefer borrowing over cloning.
Inline expressions directly into struct fields instead of introducing intermediate bindings solely for a struct literal.
Avoid unsafe unless it is required and documented.
Avoid premature collect() calls and keep iterators lazy.
Ensure Rust code compiles without warnings.
Use the most restrictive visibility that works: prefer private mod over pub mod, pub(crate) over pub, and expose items publicly only when non-documentation code outside the parent module uses them.
Before accepting new pub items, check for external non-documentation usage with imports or fully qualified paths.
Prefer newtype wrappers over raw primitives when values represent domain concepts.
Implement Display, FromStr, and other appropriate standard traits on newtypes to keep them ergonomic.
Match on enum variants instead of comparing strings.
Comments should explain why, not what; avoid inline comments, commented-out code, changelog comments, and divider comments. Contextual TODO, FIXME, HACK, and NOTE annotations are allowed.
Use structured fields with the tracing crate; never put log data in formatted strings, use no module prefixes, and do not mix structured fields with format arguments.
Use debug for development detail, info for important runtime events, warn for recoverable issues, and error for failures requiring attention.
Return domain types directly from sqlx queries instead of parsing primitives afterward.
Implement sqlx::Type, Encode, and Decode for owned newtypes used in SQLite query results, delegating to the inner primitive.
Use sqlx t...

Files:

  • crates/core/src/document/mupdf_sys.rs
  • crates/build-deps/src/versions.rs
  • crates/build-deps/src/build/kobo/mupdf.rs
  • crates/build-deps/src/build/mupdf.rs
  • crates/build-deps/src/build/kobo.rs
  • crates/build-deps/src/markers.rs
  • crates/build-deps/src/build/native.rs
**/*.{rs,toml,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

All feature combinations run on ubuntu-latest; only default and test features produce build artifacts.

Files:

  • crates/core/src/document/mupdf_sys.rs
  • crates/build-deps/src/versions.rs
  • crates/build-deps/src/build/kobo/mupdf.rs
  • crates/build-deps/src/build/mupdf.rs
  • crates/build-deps/src/build/kobo.rs
  • crates/build-deps/src/markers.rs
  • crates/build-deps/src/build/native.rs
**/*.{rs,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

When testing strings rendered through fl!, construct expected strings with fl! as well.

Files:

  • crates/core/src/document/mupdf_sys.rs
  • crates/build-deps/src/versions.rs
  • crates/build-deps/src/build/kobo/mupdf.rs
  • crates/build-deps/src/build/mupdf.rs
  • crates/build-deps/src/build/kobo.rs
  • crates/build-deps/src/markers.rs
  • crates/build-deps/src/build/native.rs
🧠 Learnings (1)
📚 Learning: 2026-05-23T14:57:43.820Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 478
File: crates/core/src/view/settings_editor/refresh_rate_by_kind_editor.rs:91-91
Timestamp: 2026-05-23T14:57:43.820Z
Learning: When reviewing Rust code that calls `ToggleableKeyboard::new(parent_rect: Rectangle, number_mode: bool)` (from `crates/core/src/view/toggleable_keyboard.rs`), treat the second argument as `number_mode` (numeric/number-layout mode), not as an initial visibility flag. In the constructor implementation, `visible` is initialized to `false` and the keyboard starts hidden; only the numeric layout changes based on `number_mode` (e.g., for numeric inputs like `refresh rate u8`). Therefore, do not flag `ToggleableKeyboard::new(rect, true)` as “making the keyboard start visible.”

Applied to files:

  • crates/core/src/document/mupdf_sys.rs
🔇 Additional comments (12)
crates/build-deps/src/build/kobo/mupdf.rs (1)

26-30: LGTM!

crates/build-deps/src/build/kobo.rs (2)

166-191: LGTM!


280-352: LGTM!

.gitmodules (1)

48-48: LGTM!

thirdparty/mupdf (1)

1-1: Verify the submodule commit matches MuPDF 1.28.0.

This diff exposes only the new commit pointer, so confirm that 205b8cf43551279d1215e88fe2845c5d595bade9 is the intended upstream MuPDF v1.28.0 revision and contains no unintended changes before merging.

crates/build-deps/src/versions.rs (1)

16-16: LGTM!

crates/core/src/document/mupdf_sys.rs (1)

25-25: LGTM!

build-scripts/mupdf/kobo.patch (1)

1-40: LGTM! Adding -std=gnu99 to the Kobo CFLAGS is a reasonable fix given the older cross-toolchain, and the -DFZ_ENABLE_* defines here don't clash with the native-side XCFLAGS_NATIVE/XCFLAGS_SHARED composition since the Kobo path only injects -DHAVE_WEBP=1 via XCFLAGS (per crates/build-deps/src/build/kobo/mupdf.rs).

crates/build-deps/src/build/mupdf.rs (1)

1-9: LGTM! Clean extraction of shared make libs args/flags with idiomatic iterator usage.

Also applies to: 26-52

crates/build-deps/src/build/native.rs (1)

21-23: LGTM! The rest of the marker-aware rebuild flow (ensure_native_artifacts, remove_build_dir, XCFLAGS_NATIVE/make_libs_invocation wiring in build_mupdf_native) looks correct and consistent with the shared build helpers.

Also applies to: 84-99, 136-143, 361-410

crates/build-deps/src/markers.rs (2)

56-80: LGTM! marker_matches_commit cleanly captures the "non-empty and equal" semantics, and is_built delegates to it correctly.


119-175: LGTM! Solid coverage of match/mismatch/empty-marker cases.

Comment thread crates/build-deps/src/build/native.rs
@OGKevin
OGKevin enabled auto-merge (squash) July 13, 2026 19:08
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 19:13 — with GitHub Actions Inactive
Change-Id: 4e2aefa515535b542854d434284124d7
Change-Id-Short: vlxplkpuyuuw
@OGKevin
OGKevin merged commit 905bfc3 into master Jul 13, 2026
82 checks passed
@OGKevin
OGKevin deleted the renovate/mupdf branch July 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Opened by an automated bot or workflow dependencies Pull requests that update a dependency file size:L This PR changes 100-499 lines, ignoring generated files. Thirdparty

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant