-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable lazy/sparse allocation of generation symlinks #538
Enable lazy/sparse allocation of generation symlinks #538
Conversation
new generations if a generation already exists. Alternatively or additionally I propose a mode where only the *last* generation will be sparse.
Doesn't this break |
Ah. Interesting. The more aggressive option that I just implemented would break this. The less aggressive option would change the semantics in a way that could be argued over. If only the newest generation would be stopped from creating new identical generations over and over again then rollback would get the semantic of "change to the generation before the last change" instead of "change to the same generation that we just created three times anyway". Glad you caught this: I had a nagging feeling that the current implementation has some edge case that I wasn't aware of. How about the other option? |
The other option sounds good. It also has a slight problem, namely that it creates the possibility that the combination of |
Alright. So if I implement the other version you'd pull that? If you're worried about the other interaction then we could make this an option, but I'd rather not create more optional complexity ... ;) |
No, let's not make it an option. |
This will make NixOS/nixpkgs#7369 a lot more sensible. |
That actually is a use-case that I'm aiming for. I'll subscribe to that issue. |
* only the last generation can be lazy * depend on the '--lazy-generation' flag to be set
Alright. How about this? I'll be happy to run through the documentation and update it if you're happy so far. Otherwise, let me know what needs changing. :) |
Hm, so you added an option after all. If we're going to have an option, I think it would be preferable to have "lazy" as the default. |
Hah. This shows its better to talk about code. :) I misunderstood you asking for an option - I thought that's what you wanted. I'm happy to rip it out again. I'd prefer this to be the way it is. Anyway, made me regain and exercise some more C++ knowledge, though. No hard feelings. I'll update later today. |
Ah. And now that I re-read your comment. For some reason I kept staring at it and it kept telling me "lets make it an option". I swear I re-read this comment about a half bazillion times to make sure that's what you want. ;) |
Alright. Thanks to my back and forth ... we now have a quite small patch. Is there a place in the documentation that would be worthwhile to update? |
Merged, thanks! |
This change will get included in 15.06, right? (Meaning the default nix version in there.) If so, we should mention the change of semantics in release notes, OK? |
Set the structure of the tutorials section
This avoids creating new generations if a generation already exists.
Alternatively or additionally I propose a mode where only the last generation will be sparse.
Would love some feedback and would be happy to implement the alternative strategy if this is too aggressive ... :)