Skip to content

chore: upgrade mdbook to 0.5.0#5568

Merged
max-sixty merged 14 commits intoPRQL:mainfrom
max-sixty:book-5
Dec 9, 2025
Merged

chore: upgrade mdbook to 0.5.0#5568
max-sixty merged 14 commits intoPRQL:mainfrom
max-sixty:book-5

Conversation

@max-sixty
Copy link
Copy Markdown
Member

Summary

Upgrades mdbook from 0.4.52 to 0.5.0 (released Nov 17, 2024).

Changes

  • Migrate to split crate structure: mdbook 0.5.0 splits the monolithic mdbook crate into specialized crates
    • mdbook-core for core types (Book, BookItem, Config)
    • mdbook-preprocessor for the Preprocessor API
  • Update Preprocessor trait: supports_renderer() now returns Result<bool> instead of bool
  • Replace boilerplate with manual implementation: Removed dependency on mdbook-preprocessor-boilerplate (not yet updated) and implemented the preprocessor CLI manually
  • Configuration cleanup: Removed deprecated multilingual field from book.toml
  • Fix HTML comment: Fixed unclosed HTML comment in sort.md

Known Issues

⚠️ Build will fail until dependencies are updated

mdbook-admonish (v1.20.0) has not yet been updated for mdbook 0.5.0. The preprocessor is included in the configuration to avoid losing it, but the book build will fail until mdbook-admonish releases a compatible version.

This PR upgrades our code to be ready for when the ecosystem catches up.

Test Plan

  • mdbook-prql library builds successfully
  • All unit tests pass (2/2)
  • All integration tests pass (5/5)
  • Lints pass (clippy clean)
  • Book builds (will fail until mdbook-admonish updates)

🤖 Generated with Claude Code

max-sixty and others added 2 commits November 17, 2025 18:58
Upgrade mdbook from 0.4.52 to 0.5.0, including:

- Migrate from monolithic `mdbook` crate to split crates:
  - `mdbook-core` for core types (Book, BookItem)
  - `mdbook-preprocessor` for preprocessor API
- Update Preprocessor::supports_renderer to return Result<bool>
- Replace mdbook-preprocessor-boilerplate with manual implementation
- Fix book.toml configuration (remove deprecated `multilingual` field)
- Fix unclosed HTML comment in sort.md

Note: mdbook-admonish preprocessor is not yet compatible with mdbook
0.5.0 (released Nov 17, 2024). The book build will fail until
mdbook-admonish is updated. We're including the configuration to
avoid losing it, but expect build failures in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Claude <no-reply@anthropic.com>
@max-sixty
Copy link
Copy Markdown
Member Author

@claude update and resolve conflicts

@claude
Copy link
Copy Markdown

claude Bot commented Dec 9, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

max-sixty and others added 12 commits December 8, 2025 19:50
- Update mdbook to 0.5.0 in build-web.yaml and tests.yaml
- Update mdbook-footnote to 0.2.0 (required for mdbook 0.5.x)
- Disable mdbook-admonish until it supports mdbook 0.5.x
  (see tommilligan/mdbook-admonish#233)

The mdbook-prql preprocessor was already updated to use
mdbook-preprocessor 0.5.0 in a previous commit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Convert all 38 admonish blocks to mdbook 0.5.0's native admonition syntax:
- `note` (24) → `[!NOTE]`
- `info` (8) → `[!NOTE]`
- `warning` (5) → `[!WARNING]`
- `example` (1) → `[!NOTE]` with "For example" prefix

This removes the dependency on mdbook-admonish, which doesn't yet
support mdbook 0.5.0 (see tommilligan/mdbook-admonish#233).

Also removes mdbook-admonish.css from book.toml since we no longer
need it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Upgrade pulldown-cmark from 0.10.3 to 0.13.0 (includes GFM blockquote
  tag support for admonitions)
- Upgrade pulldown-cmark-to-cmark from 14.0.1 to 21.1.0 (compatible with
  pulldown-cmark 0.13)
- Fix admonition markdown syntax: `[!NOTE]` must be on its own line,
  not inline with content (e.g., `> [!NOTE]\n> content` not
  `> [!NOTE] content`)
- Add test for admonition round-tripping through preprocessor

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Now that we're on mdbook 0.5.x with native admonitions, we can use the
latest versions without version pinning.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The check-links-book job was failing because it tried to build the book
without installing mdbook-footnote, which is required by book.toml.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The shell completion output changed due to an updated clap dependency.
Updated snapshots for bash, fish, zsh, and powershell completions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The shell completion test snapshots expect the new clap shell completion
format (with BASH_VERSINFO checks), which requires a newer clap version.
This fixes the test-deps-min-versions CI job.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit 10dc4c1 into PRQL:main Dec 9, 2025
77 of 78 checks passed
@max-sixty max-sixty deleted the book-5 branch December 9, 2025 06:31
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.

1 participant