NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.77k stars 1.52k forks source link

Log a message if binary cache lookup is cached #2539

Open copumpkin opened 6 years ago

copumpkin commented 6 years ago

I just wasted a bunch of time trying to figure out if my binary cache was corrupted because Nix was refusing to substitute from it. I kept running with -vvvvv and it would clearly try my cache and then decide to build the derivation anyway.

Turns out Nix had just cached a negative locally and wasn't even looking remotely. If Nix just emitted a message (fine even if just in vomit mode) saying "I'm not going to look because my local cache says it's not there" or similar, it would be nice and avoid future confusion 😄

domenkozar commented 5 years ago

I think negative caching should be just removed and improved with better logging (ie. looking up substituters .. done in XX.XX seconds). There are so many users confused because of "why is my Nix not substituting". I was there a few times and you as well, which means even for old farts it's hard to understand why :) Even with logging, one still has to know what to look for and pass the -vvv.

edolstra commented 5 years ago

Removing negative caching would be pretty disastrous for performance. Binary cache lookup latency has already increased quite a bit with the switch to fastly, so we can't really afford to do that.

domenkozar commented 5 years ago

@edolstra I remember http2 multiplexing helped quite a lot, is that not true anymore? I guess we need some benchmarks.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

stale[bot] commented 2 years ago

I closed this issue due to inactivity. → More info