mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 09:49:36 +01:00
Show flake lock file updating in the progress bar
This commit is contained in:
parent
ed80589a07
commit
966256c507
3 changed files with 19 additions and 11 deletions
|
|
@ -285,6 +285,8 @@ LockedFlake lockFlake(
|
||||||
{
|
{
|
||||||
settings.requireExperimentalFeature("flakes");
|
settings.requireExperimentalFeature("flakes");
|
||||||
|
|
||||||
|
Activity act(*logger, lvlTalkative, actLockFlake);
|
||||||
|
|
||||||
FlakeCache flakeCache;
|
FlakeCache flakeCache;
|
||||||
|
|
||||||
auto flake = getFlake(state, topRef, lockFlags.useRegistries, flakeCache);
|
auto flake = getFlake(state, topRef, lockFlags.useRegistries, flakeCache);
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ private:
|
||||||
|
|
||||||
enum StatusLineGroup {
|
enum StatusLineGroup {
|
||||||
idHelp,
|
idHelp,
|
||||||
|
idLockFlake,
|
||||||
idEvaluate,
|
idEvaluate,
|
||||||
idDownload,
|
idDownload,
|
||||||
idCopyPaths,
|
idCopyPaths,
|
||||||
|
|
@ -443,7 +444,8 @@ public:
|
||||||
if (type == actFileTransfer
|
if (type == actFileTransfer
|
||||||
|| (type == actCopyPath && hasAncestor(*state, actSubstitute, parent)) // FIXME?
|
|| (type == actCopyPath && hasAncestor(*state, actSubstitute, parent)) // FIXME?
|
||||||
|| type == actBuild
|
|| type == actBuild
|
||||||
|| type == actSubstitute)
|
|| type == actSubstitute
|
||||||
|
|| type == actLockFlake)
|
||||||
i->visible = false;
|
i->visible = false;
|
||||||
|
|
||||||
if (type == actBuild)
|
if (type == actBuild)
|
||||||
|
|
@ -593,16 +595,19 @@ public:
|
||||||
state.statusLines.insert_or_assign({idStatus, 0}, line);
|
state.statusLines.insert_or_assign({idStatus, 0}, line);
|
||||||
|
|
||||||
if (state.activitiesByType.count(actEvaluate)) {
|
if (state.activitiesByType.count(actEvaluate)) {
|
||||||
if (!state.activitiesByType[actEvaluate].its.empty()) {
|
state.statusLines.insert_or_assign({idEvaluate, 0},
|
||||||
state.statusLines.insert_or_assign({idEvaluate, 0},
|
fmt("%s Evaluating",
|
||||||
fmt(ANSI_BOLD "• Evaluating"));
|
state.activitiesByType[actEvaluate].its.empty()
|
||||||
state.statusLines.insert_or_assign({idEvaluate, 1}, "");
|
? ANSI_GREEN "✓" : ANSI_BOLD "•"));
|
||||||
} else {
|
state.statusLines.insert_or_assign({idEvaluate, 1}, "");
|
||||||
// FIXME: evaluation could fail...
|
}
|
||||||
state.statusLines.insert_or_assign({idEvaluate, 0},
|
|
||||||
fmt(ANSI_GREEN "✓ Evaluating"));
|
if (state.activitiesByType.count(actLockFlake)) {
|
||||||
state.statusLines.insert_or_assign({idEvaluate, 1}, "");
|
state.statusLines.insert_or_assign({idLockFlake, 0},
|
||||||
}
|
fmt("%s Locking flake inputs",
|
||||||
|
state.activitiesByType[actLockFlake].its.empty()
|
||||||
|
? ANSI_GREEN "✓" : ANSI_BOLD "•"));
|
||||||
|
state.statusLines.insert_or_assign({idLockFlake, 1}, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
auto renderBar = [](uint64_t done, uint64_t failed, uint64_t running, uint64_t expected)
|
auto renderBar = [](uint64_t done, uint64_t failed, uint64_t running, uint64_t expected)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ typedef enum {
|
||||||
actPostBuildHook = 110,
|
actPostBuildHook = 110,
|
||||||
actBuildWaiting = 111,
|
actBuildWaiting = 111,
|
||||||
actEvaluate = 112,
|
actEvaluate = 112,
|
||||||
|
actLockFlake = 113,
|
||||||
} ActivityType;
|
} ActivityType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue