Skip to content

mdbook 0.4.44 will break ./x.py doc #137052

Closed
@pvdrz

Description

@pvdrz
Contributor

What the title says, if you update the Cargo.lock file so it updates mdbook from 0.4.43 to 0.4.44, running ./x.py doc will panic:

thread 'main' panicked at /home/christian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mdbook-0.4.44/src/renderer/html_handlebars/search.rs:47:81:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x793b8ae44089 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hfc1f21f8db201d29
   1:     0x793b8ae9fec3 - core::fmt::write::h016056faa7a6981e
   2:     0x793b8ae0669f - std::io::Write::write_fmt::h24b894747b35c3c0
   3:     0x793b8ae43ed3 - std::sys::backtrace::BacktraceLock::print::heebf86472dec8fe7
   4:     0x793b8ae241fc - std::panicking::default_hook::{{closure}}::h6d72acfbda71ec98
   5:     0x793b8ae24109 - std::panicking::default_hook::h8be7653a5e9957aa
   6:     0x793b8ae2473e - std::panicking::rust_panic_with_hook::h6aa9de01d2a3556f
   7:     0x793b8ae45066 - std::panicking::begin_panic_handler::{{closure}}::he4940efa6b78295e
   8:     0x793b8ae442b9 - std::sys::backtrace::__rust_end_short_backtrace::h6d8392e54739a970
   9:     0x793b8ae2429d - rust_begin_unwind
  10:     0x793b87896880 - core::panicking::panic_fmt::he144472e74486d6c
  11:     0x793b8789690c - core::panicking::panic::h9b72aee951677e47
  12:     0x793b878967f9 - core::option::unwrap_failed::h6e1b719b223197a6
  13:     0x5ab541711bef - mdbook[a979f49934072b30]::renderer::html_handlebars::search::create_files
  14:     0x5ab541782d36 - <mdbook[a979f49934072b30]::renderer::html_handlebars::hbs_renderer::HtmlHandlebars as mdbook[a979f49934072b30]::renderer::Renderer>::render
  15:     0x5ab54171f512 - <mdbook[a979f49934072b30]::book::MDBook>::execute_build_process
  16:     0x5ab54171ea06 - <mdbook[a979f49934072b30]::book::MDBook>::build
  17:     0x5ab5416f07d3 - error_index_generator[7ec2f52f1ffd143e]::main
  18:     0x5ab5416f1373 - std[778bddf7b4c93277]::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
  19:     0x5ab5416f49e9 - std[778bddf7b4c93277]::rt::lang_start::<()>::{closure#0}
  20:     0x793b8ae3f915 - std::rt::lang_start_internal::h808f256575e6d97e
  21:     0x5ab5416f11e8 - main
  22:     0x793b86e35488 - <unknown>
  23:     0x793b86e3554c - __libc_start_main
  24:     0x5ab5416ece35 - _start
  25:                0x0 - <unknown>
Command has failed. Rerun with -v to see more details.

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Feb 14, 2025
GrigorenkoPV

GrigorenkoPV commented on Feb 17, 2025

@GrigorenkoPV
Contributor

Can reproduce on master (273465e).

  1. Apply this patch:
    diff --git a/Cargo.lock b/Cargo.lock
    index 38a861727a9..9d736356bb5 100644
    --- a/Cargo.lock
    +++ b/Cargo.lock
    @@ -2230,9 +2230,9 @@ dependencies = [
    
    [[package]]
    name = "mdbook"
    -version = "0.4.43"
    +version = "0.4.44"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    -checksum = "fe1f98b8d66e537d2f0ba06e7dec4f44001deec539a2d18bfc102d6a86189148"
    +checksum = "f9da1e54401fe5d45a664c57e112e70f18e8c5a73e268c179305b932ee864574"
    dependencies = [
    "ammonia",
    "anyhow",
  2. Then ./x doc src/tools/error_index_generator
ehuss

ehuss commented on Feb 17, 2025

@ehuss
Contributor

Thanks for the report! I will take a look at this.

self-assigned this
on Feb 17, 2025
added
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Feb 17, 2025
added a commit that references this issue on Feb 18, 2025

Rollup merge of rust-lang#137191 - ehuss:update-mdbook, r=jieyouxu

05dbe6d
added a commit that references this issue on Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @ehuss@pvdrz@rustbot@GrigorenkoPV

    Issue actions

      mdbook 0.4.44 will break `./x.py doc` · Issue #137052 · rust-lang/rust