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

migrate to 2021 edition #1831

Closed
wants to merge 1 commit into from

Conversation

Dylan-DPC
Copy link
Member

  • Moves to 2021 edition
  • Removes extern crate for crates that were needed for macros, and replaced with imports in respective modules
  • bumps msrv to 1.56.0 (version where edition was added)

Copy link
Contributor

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

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

These two fix the failing tests.

@@ -890,8 +892,6 @@ mod tests {
title = "mdBook Documentation"
description = "Create book from markdown files. Like Gitbook but implemented in Rust"
authors = ["Mathieu David"]
src = "./source"
[rust]
Copy link
Contributor

Choose a reason for hiding this comment

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

The test fails because this line was removed—edition should be in the rust table.

@@ -588,7 +589,7 @@ impl HtmlConfig {

/// Configuration for how to render the print icon, print.html, and print.css.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default, rename_all = "kebab-case")]
#[serde(rename_all = "kebab-case")]
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes the print_config test fail because the page_break key is missing.

(Incidentally, this is logged... but tests don't enable logging. Adding the following at the beginning of the test resolves that:

env_logger::builder().is_test(true).try_init().unwrap();

)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @ISSOtm, wow, thank you very much for debugging this! I wanted to fix the errors on the branch and this one made me scratch my head 😄

@mgeisler
Copy link
Contributor

Hey @Dylan-DPC, could you update the PR to fix the failing tests? I also wanted to bump the MSRV in #1866 so that I could play with edition 2021 dependencies in #1864.

@mgeisler
Copy link
Contributor

mgeisler commented Aug 9, 2022

Anything I can do to help here? It seems @ISSOtm already debugged the failing tests, so it should be easy to fix.

@Dylan-DPC
Copy link
Member Author

Yeah i was busy with other projects so i didnt get the time to finish this. If you wish you can push a commit to my branch or I can look into it in a few days time hopefully

@mgeisler
Copy link
Contributor

Yeah i was busy with other projects so i didnt get the time to finish this. If you wish you can push a commit to my branch or I can look into it in a few days time hopefully

Hi @Dylan-DPC, it's great to hear that you're still looking at it! I'm about to go on vacation for the rest of the week, so no hurry.

Note that I'm just a random guy, I'm not a maintainer or anything like that :-) I just (also) wants to see mdBook move to the new edition :-D

@mgeisler
Copy link
Contributor

This was merged in #1887.

@ehuss
Copy link
Contributor

ehuss commented Sep 12, 2022

Thanks, closing as resolved by #1887.

@ehuss ehuss closed this Sep 12, 2022
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