diff options
author | Florian Klink <flokli@flokli.de> | 2024-12-26T13·50+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-12-27T12·04+0000 |
commit | 661a80ac3bcd6757289b9be2a47a74f696cea4cc (patch) | |
tree | 58fbe4e03a5a5ab80206816c3062e9b21d4bd0ed | |
parent | 6e4f06705431f88a1c1594decf3c8343e7c045c1 (diff) |
fix(tvix/nar-bridge): set FileSize to NarSize r/9034
Nix and Lix both report this quite wrong when showing progress, they assume 0.00 MiB of download size: ``` these 3 derivations will be built: /nix/store/m6dkr67hk87lpcz9wv8f2mp2zrgsyfp9-nix-2.24.11.drv /nix/store/zcfi6vs0z18309asw8fpa9v3665av44v-niv-0.2.22.drv /nix/store/g4kvzrs1kk9i13vaa8q1r0y4hgsqsnlp-dev-env.drv these 112 paths will be fetched (0.00 MiB download, 2649.76 MiB unpacked): /nix/store/3qzlg8h5qc1slypy99aafdcgkzj6974h-OneTuple-0.4.2 /nix/store/pp4540rig52fnj66kz1kiaj1000ja9v0-QuickCheck-2.14.3 /nix/store/416aqss6p59w6v92127hkz04v0bclx21-StateVar-1.2.2 /nix/store/b5f93spm2cl9g6x73dnx7ns5irs739fz-aeson-2.1.2.1 /nix/store/nqnx6k6y103rargdz2gai2rmi389zn6n-aeson-pretty-0.8.10 /nix/store/11wc4s6a6qi98lxikacw746slhmj5dl7-ansi-terminal-1.0.2 /nix/store/yy7j66av9lwh3lvbxp1zv7572wb4l7dj-ansi-terminal-types-0.11.5 /nix/store/cn6m459cbacdwkvjllgy5hkzf045yc1g-appar-0.1.8 […] ``` For now, set FileSize to NarSize - it's not more wrong than it was before, Nix already supports content encoding for compression (via curl). Reported-On: https://git.lix.systems/lix-project/lix/issues/606 Change-Id: Ia53506ecf6678ad298f759c95a69feb441cbc26d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12919 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
-rw-r--r-- | tvix/nar-bridge/src/narinfo.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/nar-bridge/src/narinfo.rs b/tvix/nar-bridge/src/narinfo.rs index 448aebcd6b9f..25022b89d8ac 100644 --- a/tvix/nar-bridge/src/narinfo.rs +++ b/tvix/nar-bridge/src/narinfo.rs @@ -153,6 +153,10 @@ fn gen_narinfo_str(path_info: &PathInfo) -> String { path_info.nar_size, ); narinfo.url = &url; + + // Set FileSize to NarSize, as otherwise progress reporting in Nix looks very broken + narinfo.file_size = Some(narinfo.nar_size); + narinfo.to_string() } |