Skip to content

docs.rs fails to build docs because --resource-suffix was removed from rustc in 1.58.1 #1630

Closed
@michidk

Description

@michidk

Crate name

off-rs

Build failure link

https://docs.rs/crate/off-rs/0.1.3/builds/500166

Additional details

When pushing my crate off-rs to crates.io the docs build fails on docs.rs with the following error:

[INFO] [stderr]  Documenting off-rs v0.1.3 (/opt/rustwide/workdir)
[INFO] [stderr] thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:929:16
[INFO] [stderr] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[INFO] [stderr] 
[INFO] [stderr] error: internal compiler error: unexpected panic
[INFO] [stderr] 
[INFO] [stderr] error: Unrecognized option: 'resource-suffix'
[INFO] [stderr] 
[INFO] [stderr] error: could not document `off-rs`

I haven't got it to work ever since it first failed (the first version worked). The repo is here: https://github.com/michidk/off-rs/tree/6a0146d4f2cadb1e46ce8849abd0269cd97d3528
Building the docs locally on my machine works without any issues, even on nightly.

I expected to see this happen: Docs build successfully on docs.rs

Instead, this happened: Rust panics, full log: https://docs.rs/crate/off-rs/0.1.3/builds/500166

Edit: Can replicated it locally, by using rustc v 1.58.1. With v1.58 it worked, with v1.58.1 it fails using this command rustdoc +nightly --edition=2021 --crate-type lib --crate-name off_rs src/lib.rs --target x86_64-unknown-linux-gnu -o target/x86_64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=390ff25bd5d00bc9 -L dependency=target/x86_64-unknown-linux-gnu/debug/deps -L dependency=target/debug/deps -Z unstable-options --emit=invocation-specific --resource-suffix -20220126-1.60.0-nightly-6abb6385b --static-root-path / --cap-lints warn --disable-per-crate-search --crate-version 0.1.3

Seems like --resource-suffix was removed from rust without adjusting docs.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions