Nix: Progress bar documentation

Created on 10 Feb 2020  Â·  2Comments  Â·  Source: NixOS/nix

Is there any documentation on the progress bar that nix build outputs? I couldn’t find any, and it’s very confusing. It’s impossible to guess what those numbers between [ and ] mean.

I looked at the source code and now _I know_ that blue and green are “running” and “done”, but the white number is “expected” and I still have no idea what it is. It’s going down all the time while the build is running, so my guess is that it is “remaining” but why is it called “expected” then? Why is it initialised with done even though there is a field called expected?

Most helpful comment

[1/0/4 built, 1/56/58 copied (618.5/895.2 MiB), 133.3/244.4 MiB DL] fetching rustc-1.40.0 from https://cache.nixos.org
  • 1 = number of active builds
  • 0 = number of succeeded builds
  • 4 = number of expected builds
  • 1 = number of paths being substituted
  • 56 = number of paths successfully substituted
  • 58 = number of paths expected to be substituted
  • 618.5 MiB = bytes written to the Nix store
  • 895.2 MiB = bytes expected to be written to the Nix store
  • 133.3 MiB = bytes downloaded
  • 244.4 MiB = bytes expected to be downloaded
  • fetching rustc-1.40.0 from https://cache.nixos.org = message from the latest activity (download, build, ...)

"Expected" refers to the predicted final total. So it should never be lower than "done".

In the interest of simplification, we could get rid of the "copied" stuff. I.e. the progress bar would become

[1/0/4 built, 133.3/244.4 MiB DL] fetching rustc-1.40.0 from https://cache.nixos.org

All 2 comments

[1/0/4 built, 1/56/58 copied (618.5/895.2 MiB), 133.3/244.4 MiB DL] fetching rustc-1.40.0 from https://cache.nixos.org
  • 1 = number of active builds
  • 0 = number of succeeded builds
  • 4 = number of expected builds
  • 1 = number of paths being substituted
  • 56 = number of paths successfully substituted
  • 58 = number of paths expected to be substituted
  • 618.5 MiB = bytes written to the Nix store
  • 895.2 MiB = bytes expected to be written to the Nix store
  • 133.3 MiB = bytes downloaded
  • 244.4 MiB = bytes expected to be downloaded
  • fetching rustc-1.40.0 from https://cache.nixos.org = message from the latest activity (download, build, ...)

"Expected" refers to the predicted final total. So it should never be lower than "done".

In the interest of simplification, we could get rid of the "copied" stuff. I.e. the progress bar would become

[1/0/4 built, 133.3/244.4 MiB DL] fetching rustc-1.40.0 from https://cache.nixos.org

But why is “expected” going down in the process without any other numbers being incremented? What makes “expected” builds disappear?

Was this page helpful?
0 / 5 - 0 ratings