Skip to content

RenderContext parsing error: unknown variant 2024 #92

@ghost-in-the-zsh

Description

@ghost-in-the-zsh

Updating book.toml files to have edition = "2024"1 under their [rust] blocks causes mdbook-linkcheck to fail when trying to use mdbook itself. For example:

$ mdbook serve docs/spec
2025-03-06 20:37:25 [INFO] (mdbook::book): Book building has started
2025-03-06 20:37:25 [INFO] (mdbook::book): Running the html backend
2025-03-06 20:37:25 [INFO] (mdbook::book): Running the linkcheck backend
2025-03-06 20:37:25 [INFO] (mdbook::renderer): Invoking the "linkcheck" renderer
Error: Unable to parse RenderContext

Caused by:
    unknown variant `2024`, expected one of `2021`, `2018`, `2015` for key `edition` at line 1 column 83582
2025-03-06 20:37:25 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2025-03-06 20:37:25 [ERROR] (mdbook::utils): Error: Rendering failed
2025-03-06 20:37:25 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed

The current workarounds are to either:

  • comment out the [output.linkcheck] block, or
  • revert edition back to "2021".

It's been a few years since the last release. Is this project still maintained/active? If not2, is there an actively maintained fork that may be a good recommendation?

PS: Why does checking for links in .md files require knowledge of rust.edition entries in the .toml files? Just curious.

Footnotes

  1. This PR shows mdbook merged Rust 2024 edition support back in June 2024.

  2. In such a case, this repo should also be archived, just to make it clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions