Skip to content

Revert: Remove the book.multilingual field and don't serialize it #2689

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 2 commits into from
May 5, 2025

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 5, 2025

This reverts #2646 since I overlooked that this would be a breaking API change. Instead it just adds a serde(skip_serializing) so that it doesn't show up in mdbook init. We'll plan to remove it in the future (cc #2636).

ehuss added 2 commits May 5, 2025 14:01
This reverts rust-lang#2646 because I
overlooked that this is a public field in a public struct, which would
be a breaking API change.
This skips serializing of the multilingual field since it is unused, and
we plan to remove it in the future. This helps avoid it showing up in
`mdbook init`.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 5, 2025
@ehuss ehuss enabled auto-merge May 5, 2025 21:08
@ehuss ehuss added this pull request to the merge queue May 5, 2025
Merged via the queue into rust-lang:master with commit 2a4e514 May 5, 2025
14 checks passed
@szabgab
Copy link
Contributor

szabgab commented May 6, 2025

Why is this a breaking API change and how could one (well, me) know?

@ehuss
Copy link
Contributor Author

ehuss commented May 6, 2025

Removing a field from a public type is a breaking change because code that constructs the type, such as:

BookConfig {
    title: Some(String::from("mdBook Documentation")),
    authors: vec![],
    description: Some(String::from("Description")),
    src: PathBuf::from("./source"),
    multilingual: false,
    language: None,
    text_direction: None,
};

This would fail to compile if the field was removed.

This can be checked with something like cargo-semver-checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants