Skip to content

Add rustfmt when installing a new toolchain #913

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

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/db/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub enum PoolError {
#[fail(display = "the provided database URL was not valid")]
InvalidDatabaseUrl(#[fail(cause)] postgres::Error),

#[fail(display = "failed to create the connection pool")]
#[fail(display = "failed to create the database connection pool")]
PoolCreationFailed(#[fail(cause)] r2d2::Error),

#[fail(display = "failed to get a database connection")]
Expand Down
3 changes: 3 additions & 0 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ impl RustwideBuilder {
for target in &targets_to_install {
self.toolchain.add_target(&self.workspace, target)?;
}
// NOTE: rustup will automatically refuse to update the toolchain
// if `rustfmt` is not available in the newer version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this behavior, or should we not block the update on it and only have optional rustfmt support? This will currently result in occasionally having like a week without updating the nightly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think going a week without updating is better than having rustfmt support you can only sometimes depend on. See #357 (comment).

self.toolchain.add_component(&self.workspace, "rustfmt")?;

self.rustc_version = self.detect_rustc_version()?;
if old_version.as_deref() != Some(&self.rustc_version) {
Expand Down