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

Improved error message when no baseline version found on crates.io #456

Merged
merged 7 commits into from
May 29, 2023
12 changes: 8 additions & 4 deletions src/rustdoc_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,14 @@ impl RustdocGenerator for RustdocFromRegistry {
rustdoc_cmd: &RustdocCommand,
crate_data: CrateDataForRustdoc,
) -> anyhow::Result<PathBuf> {
let crate_ = self
.index
.crate_(crate_data.name)
.with_context(|| anyhow::format_err!("{} not found in registry", crate_data.name))?;
let crate_ = self.index.crate_(crate_data.name).with_context(|| {
anyhow::format_err!(
"{} not found in registry (crates.io). \
For workarounds check \
obi1kenobi marked this conversation as resolved.
Show resolved Hide resolved
https://github.com/obi1kenobi/cargo-semver-checks#does-the-crate-im-checking-have-to-be-published-on-cratesio",
crate_data.name
)
})?;

let base_version = if let Some(base) = self.version.as_ref() {
base.to_string()
Expand Down