jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.84k stars 188 forks source link

[nix-cache] Prevent checking cache twice per package #2055

Closed mikeland73 closed 1 month ago

mikeland73 commented 1 month ago

Summary

Fixes bug described here https://github.com/jetify-com/devbox/pull/2054

A better (but a bit more involved) solution is to parallelize by output. Currently we parallelize by meta-output (which includes __default_output__). This has two downsides:

How was it tested?

mikeland73 commented 1 month ago

I don't understand why fetchNarInfoStatus ended up calling twice. Did we end up getting different keys for the same installable?

yeah, we call it once per output and once for __default_output__.

So for a given package with a single (default) output out, we call it twice, once cached under key with out and once with key __default_output__