Skip to content

Commit ded7253

Browse files
committed
[mdbook] Add patch for .mdbookignore
Mdbook has no way to ignore files when copying the website. There is an unmerged PR (rust-lang/mdBook#1908) which adds a .mdbookignore file to do that. This commit cherry picks this PR as a patch. This is not entirely straightforward however: - the PR modifies files which are not found in the release source (like the documentation) - the PR modifies Cargo.toml but the git's version differs from the crates.io version (which normalizes Cargo.toml) - the PR applies on the latest version, but we use version 0.4.43 For this reason, the patch is a trimmed down and manually edit version of the PR. Furthermore, there is another difficulty: the patch makes `ignore` a required dependency when previously mdbook only had it as an optional (and not enabled) dependency, it also bumps the version. For this reason, this commit manually adds the required version of `ignore` to the Cargo.toml and uses rules_rust crate annotations to add a dependency from mdbook to this version of `ignore`. Signed-off-by: Amaury Pouly <amaury.pouly@lowrisc.org>
1 parent b841e15 commit ded7253

File tree

5 files changed

+494
-22
lines changed

5 files changed

+494
-22
lines changed

MODULE.bazel.lock

Lines changed: 175 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third_party/mdbook/Cargo.lock

Lines changed: 107 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third_party/mdbook/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ path = "empty_file_to_appease_cargo.rs"
1212

1313
[dependencies]
1414
mdbook = { version = "0.4.43", default-features = false, features = ["search"] }
15+
# Required by the patched version of mdbook (mdbookignore feature).
16+
ignore = "0.4.23"

0 commit comments

Comments
 (0)