-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
all-packages: Apply packageOverrides package-by-package #9400
Conversation
Oh, and this fixes #2817. |
So what if you want to override 2 packages a and b, and one also depends on the other? Does a see the new b or the old b? |
Also the manual must be updated. Have to study this change in the next days, cc @edolstra in the while. |
a sees the new b. Here's the fragment I used to test mergeFuncs:
|
3629535
to
8f28bce
Compare
Why do we have to do that? I would expect that we could manage to avoid recursive dependencies manually without having to rely on the package dependencies? From what I understand, this means that one can override one package at a time, but not multiple one. Basically this sounds like an old VCS issues (CVS) where revisions were per-file and not per-set of changes. I would prefer if we could avoid automation of work-around, when there is an issue in terms of definition. Being able to define a set of packages extending the previous one (extending) is as useful as being able to replace a set of packages as a replacement (overriding) of the previous one (bootstraping). |
8f28bce
to
e69255b
Compare
@nbp Updated, this uses an approach similar to haskellPackages.
It should be clearer now that
We don't "have" to, it's just that this provides more convenient behavior. With the override-Packages approach, you have to write out
So it seems to be faster/ lower memory in all cases except for fully evaluating the full nixpkgs set. |
Based on the existing comment, I think the Also, even if I think this merging function makes sense, I do think that it might be terrible in terms of memory consumption, as we would have a new version of the |
f825442
to
62e3783
Compare
I've made a new version, without |
This way is cleaner, slightly faster (as shown by some quick tests) and causes no rebuilds. It could cause some evaluation errors though.
62e3783
to
9c0121b
Compare
Big 👍 |
all-packages: Apply packageOverrides package-by-package
For anyone not paying attention, @edolstra seems to have temporarily reverted this for breaking in some way. @edolstra, if you point out what's wrong, perhaps @Mathnerd314 can fix it and we can try again? |
I reverted it because I haven't had time to review it yet, and this looks like it might have a big impact so I feel I need to give it proper attention. Sorry about that... |
Well, it doesn't do anything to the builds, those are unchanged. I guess it might have done something to the evaluator; there seem to be a lot of aborted and queued builds. I can't say I'm surprised though, reverts seem to be the Nix development style. |
This is unfortunate. |
@Mathnerd314 could you reopen the PR? |
I can't AFAICT. I could file a new PR though. |
Better do new PR then? |
I'll open it eventually. It's on my calendar at June 24, 2016. |
@edolstra , when would you be able to review this change? I would appreciate if we review and fix what is preventing it to be merge, as this is a blocker for the rest of the security update issue. |
Can close now that #14000 is merged? |
It's already closed. |
Oh, github race condition or my bad :). |
This commit rewrites the package recursion so that, rather than a package expression seeing all of the un-overriden packages, it sees all of the overriden packages except for the package that is currently being evaluated.
It also implements recursive merging, but this isn't useful yet because the meta-package has to use 'with pkgs.x' instead of rec.
Also note that this is not a mass-rebuild (hashes are identical).