Skip to content

Update to Rust 2024 edition. #2658

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

Merged
merged 10 commits into from
May 23, 2025
Merged

Update to Rust 2024 edition. #2658

merged 10 commits into from
May 23, 2025

Conversation

qwandor
Copy link
Collaborator

@qwandor qwandor commented Feb 25, 2025

No description provided.

@qwandor qwandor force-pushed the edition2024 branch 2 times, most recently from 40a6949 to 05c4b7d Compare February 25, 2025 18:08
@qwandor qwandor requested a review from djmitche February 25, 2025 18:08
Copy link
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

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

The diff looks good!

@qwandor qwandor force-pushed the edition2024 branch 2 times, most recently from 52c320f to f5787fe Compare February 26, 2025 15:05
@qwandor qwandor force-pushed the edition2024 branch 2 times, most recently from 815bdd5 to b9641a7 Compare April 15, 2025 12:29
@qwandor
Copy link
Collaborator Author

qwandor commented Apr 15, 2025

This is blocked on a new version of mdbook-svgbob being released with support for Rust 2024 edition.

Copy link
Collaborator

@michael-kerscher michael-kerscher left a comment

Choose a reason for hiding this comment

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

When trying to manually build the book with these changes (after manual installation of mdbook-svgbob from the git repo - as there is no release yet) I get this error from linkcheck (0.7.7)

$ mdbook build
2025-04-17 09:29:35 [INFO] (mdbook::book): Book building has started
2025-04-17 09:29:35 [INFO] (mdbook::book): Running the exerciser backend
2025-04-17 09:29:35 [INFO] (mdbook::renderer): Invoking the "exerciser" renderer
2025-04-17 09:29:35 [INFO] (mdbook::book): Running the html backend
2025-04-17 09:29:36 [INFO] (mdbook::book): Running the linkcheck backend
2025-04-17 09:29:36 [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 702979
2025-04-17 09:29:36 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2025-04-17 09:29:36 [ERROR] (mdbook::utils): Error: Rendering failed
2025-04-17 09:29:36 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed

When linkcheck is disabled this change looks good to me.

@qwandor
Copy link
Collaborator Author

qwandor commented Apr 23, 2025

When trying to manually build the book with these changes (after manual installation of mdbook-svgbob from the git repo - as there is no release yet) I get this error from linkcheck (0.7.7)

...

When linkcheck is disabled this change looks good to me.

Looks like mdbook-linkcheck has the same issue as mdbook-svgbob of depending on an old version of mdbook. mdbook-linkcheck hasn't had a release in over 2 years and seems unmaintained, but mdbook-linkcheck2 is an active fork which fixes the issue so I've switched to that instead.

Copy link
Collaborator

@michael-kerscher michael-kerscher left a comment

Choose a reason for hiding this comment

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

There is still the issue with the new crate version mdbook-svgbob 0.2.2 not yet pushed but otherwise this now looks good to me!

@qwandor qwandor force-pushed the edition2024 branch 2 times, most recently from a7024aa to 47d9593 Compare May 22, 2025 21:20
qwandor added 5 commits May 23, 2025 17:21
mdbook-linkcheck hasn't had a release in 2 years and doesn't support
Rust 2024 edition.
It looks in the output.linkcheck section rather than its own.
@qwandor qwandor merged commit fc6e5c7 into main May 23, 2025
38 checks passed
@qwandor qwandor deleted the edition2024 branch May 23, 2025 18:03
@@ -25,7 +25,7 @@ else
# Back-date the sources to POT-Creation-Date. The content lives in two
# directories:
rm -r src/ third_party/
git restore --source "$(git rev-list -n 1 --before "$pot_creation_date" @)" src/ third_party/
git restore --source "$(git rev-list -n 1 --before "$pot_creation_date" @)" src/ third_party/ book.toml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Heads up @jonodeno: I believe your google/mdbook-i18n-helpers#268 will need to be updated to take this into account.

Cc @michael-kerscher as well, who has been reviewing the other PR.

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.

4 participants