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

Cache generated rustdoc for registry baselines #339

Merged
merged 3 commits into from
Feb 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Extract variable
  • Loading branch information
thomaseizinger committed Feb 2, 2023
commit bd26eb88a19ed96cfab861400fc65e7f48ef9607
7 changes: 4 additions & 3 deletions src/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,12 @@ impl BaselineLoader for RegistryBaseline {
choose_baseline_version(&crate_, version_current)?
};

let base_root = self.target_root.join(format!(
let crate_identifier = format!(
"registry-{}-{}",
slugify(name),
slugify(&base_version)
));
);
let base_root = self.target_root.join(crate_identifier);
std::fs::create_dir_all(&base_root)?;
let manifest_path = base_root.join("Cargo.toml");

Expand Down Expand Up @@ -411,7 +412,7 @@ mod tests {
"yanked": yanked,
"cksum": "00".repeat(32),
}))
.expect("hand-written JSON used to create mock crates_index::Version should be valid")
.expect("hand-written JSON used to create mock crates_index::Version should be valid")
}

fn new_crate(versions: Vec<Version>) -> Crate {
Expand Down