Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenderContext parsing error: unknown variant 2024 #92

Open
ghost-in-the-zsh opened this issue Mar 7, 2025 · 0 comments
Open

RenderContext parsing error: unknown variant 2024 #92

ghost-in-the-zsh opened this issue Mar 7, 2025 · 0 comments

Comments

@ghost-in-the-zsh
Copy link

ghost-in-the-zsh commented Mar 7, 2025

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.

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

No branches or pull requests

1 participant