Skip to content

Commit 693b4d6

Browse files
committed
purge all rustwide build directories before each build
1 parent 76b471d commit 693b4d6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/docbuilder/rustwide_builder.rs

+13
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,19 @@ impl RustwideBuilder {
363363
}
364364
}
365365

366+
// FIXME: for now, purge all build dirs before each build.
367+
// Currently we have some error situations where the build directory wouldn't be deleted
368+
// after the build failed:
369+
// https://github.com/rust-lang/docs.rs/issues/820
370+
// This should be solved in a better way, likely refactoring the whole builder structure,
371+
// but for now we chose this simple way to prevent that the build directory remains can
372+
// fill up disk space.
373+
// This also prevents having multiple builders using the same rustwide workspace,
374+
// which we don't do. Currently our separate builders use a separate rustwide workspace.
375+
self.workspace
376+
.purge_all_build_dirs()
377+
.map_err(FailureError::compat)?;
378+
366379
let mut build_dir = self.workspace.build_dir(&format!("{name}-{version}"));
367380
build_dir.purge().map_err(FailureError::compat)?;
368381

0 commit comments

Comments
 (0)