Merge "repl: show a progress bar while performing builds" into main

This commit is contained in:
alois31 2024-05-09 04:32:55 +00:00 committed by Gerrit Code Review
commit da0e1f5716

View file

@ -605,6 +605,14 @@ ProcessLineResult NixRepl::processLine(std::string line)
Path drvPathRaw = state->store->printStorePath(drvPath); Path drvPathRaw = state->store->printStorePath(drvPath);
if (command == ":b" || command == ":bl") { if (command == ":b" || command == ":bl") {
// TODO: this only shows a progress bar for explicitly initiated builds,
// not eval-time fetching or builds performed for IFD.
// But we can't just show it everywhere, since that would erase partial output from evaluation.
startProgressBar();
Finally stopLogger([&]() {
stopProgressBar();
});
state->store->buildPaths({ state->store->buildPaths({
DerivedPath::Built { DerivedPath::Built {
.drvPath = makeConstantStorePathRef(drvPath), .drvPath = makeConstantStorePathRef(drvPath),