-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
flakes: No longer compute revCount for local git repository by default #13260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
5b13707
to
8b5e637
Compare
fc19348
to
fb64d5b
Compare
Flake regression is unrelated (500er http github error). |
This needs a release note since it's an incompatible change (and we probably shouldn't backport it for that reason). BTW, maybe as an alternative we can make revCount computation lazy. I.e. it would only be computed if the flake actually uses the |
Yeah. I had the label still assigned before I made this change, when it was still a fix.
I considered the alternative but decided against it because it would still than try to compute the revCount when we override flake inputs in other flakes in which case revCount will always be recorded and checked in the flake.lock. |
I fully agree. As expensive as computing |
On that note, FlakeHub prohibits a hard revcount dependency because it loses that data once it is published. In other words, it is unlikely a primarily-flakehub backed corpus would fail if the feature went away. We did find a fair number of our own repository depended on the revcount to evaluate at first, which we ended up fixing. I'd encourage some sort of graceful upgrade path here, like continuing to calculate the revCount for the next N releases paired with a strong evaluation-time admonition about it going away. |
Shallow clones are faster to access because we don't have to compute the revCount, which in sparse checkouts might not even exists. This is especially useful in combination with lazy trees in mind on large repository such as nixpkgs.
fb64d5b
to
09a7ce9
Compare
Ok. Than we need to make the revCount attribute lazy so we can issue a warning on first access. |
Computing a revCount is expensive and might not work if the local history is not complete.
This particular fixes a long standing crash bug in Nix: #6073
Motivation
Depends on #13265
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.