Show Download Progress (at least for large downloads) #737
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#737
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
When lix downloads large files, for example for closed source packages like ut1999, then it looks like the download just hangs. TUI Shot:
Describe the solution you'd like
I would like the download progress to show, so one can see that the download is progressing.
Some solutions I can see:
There for sure are other / better methods to achieve this, but it would be really good to not seem like nix just hangs.
Describe alternatives you've considered
nix-output-monitor often provides great visualization, but not in this case.
that's actually not even a lix problem, but a nixpkgs problem. the download you're seeing isn't done by lix itself but from inside a fixed-output derivation, and that derivation doesn't give progress reports on its stdout (which is all lix can observe about this download). we agree that there could be better integration of progress reporting in lix with this, but the easier fix would be to ask nixpkgs about adding a bit of progress reporting to their FOD fetchers
As far as I can tell the download is done by
builtin.fetchurl()
I was under the impression that is something that lix provides. Is that not the case?builtins.fetchurl
is done using curl, but the fetcher used here isn't that. what you're seeing is nixpkgs' version of fetchurl that runs curl inside derivation sandbox (hence theUT_GOTY_CD1.iso>
prefix in log lines); our builtin fetchers cannot print statistics in the shape you're seeing hereIs there any infrastructure in lix that allows nixpkgs to actually show progress? I mean, can this actually be solved by nixpkgs and if yes, how?
See https://github.com/NixOS/nixpkgs/issues/389794
@dwt wrote in #737 (comment):
there is none at this point (though we conceivably could and should add some in the future). for now the nixpkgs FOD fetchers can output some status information regularly (e.g. every second) though, which will show up in the build logs and multiline log mode (albeit not in the lix download meter).
I think in theory they could emit progress events to NIX_LOG_FD which would drive the progress bar? idk how they'd implement it in nixpkgs though.
that requires an activity ID though, and there's currently no way to generate one inside a build sandbox that is guaranteed to not collide with other ids (although the current mechanism does allow for "very likely no collision"s). even when you have such an id though you'd want to parent it to the build activity, which we cannot do :(
Actually there was a nixpkgs bug that I missed that already tries to address this