-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
WIP: splitting packages into multiple outputs #7701
Conversation
Opened a PR so people can browse the differences more easily, and we get a place to discuss the topic. Some hoped to have this ready for the upcoming release, but I don't seem to be able to stabilize it enough all by myself. |
I hope the key to making NixOS boot is in understanding these messages:
I don't understand that – the executable does exist on that path, and that path |
👍 really exciting to see this happening, thanks! |
Is there a single VM test or simple command that someone can run to reproduce/iterate on the failures you're encountering? |
I think any attempt to boot NixOS would fail, even in a VM, but I haven't tried. Some of my filesystems won't mount IIRC (it's just plain btrfs). |
This might be silly, but would it ease the transition if we took the existing |
Not much AFAIK. The point is getting rid of dependencies on the other files. If I knew what particular packages are causing the problems, I could e.g. just make them single-output again, for the time being. I've done a few such (partial) steps back for now, when there were too many references that would need changing and the space benefit was low. |
@vcunat perhaps about your mounting problems, you could try not splitting the mount.* related packages, or btrfs util related packages etc.. |
Is there any progress? Is this going to make it into 15.06? |
No, we would need several weeks at least to stabilize that in any case (it's a rather disturbing change), so I postponed it past the release (focusing more on that ATM). |
Fair enough. Another thing I was wondering is whether there's a more incremental approach to merging this in, where we can slowly make the harmless packages multi-outputs in small bites without trying to do so much at once. In my experience, monolithic changes tend to languish because they're too overwhelming to fix/review/work on. Basically, is there a sensible way to break this PR into smaller less-risky units that we could start merging in sooner? |
Well, maybe. I might somehow drop lots of the old commits and focus just e.g. on stdenv stuff first, or whatever packages have best savings/risk ratio. There were lots of packages split years ago, but the changes seem untested properly (and/or rotten w.r.t. master changes in the meantime). |
I've cherry-picked a5fb184 into staging as it makes Python closure for ~100MB lighter |
TODO note:
|
Perhaps we should cherry-pick more of this into master, updating the PR branch as we go along to show the diff getting smaller? It seems dauntingly large right now, which is a maintenance nightmare given an evolving nixpkgs, and also scares people from contributing. Are the commits mostly self-contained, or do they actually depend on one another? I'd be willing to pick a few low-hanging fruit in the name of helping this along. |
They often aren't self-contained by themselves, and none of the "commit states" in the branch yields a fully functioning system, I believe. I expect to go back to it after the release and start by porting the shared infrastructure to staging (mostly autotools-focused ATM), which by itself should be relatively easy (for me) and breaking very few packages (with fixes somewhere in the branch already). And perhaps write some description/documentation/tutorial. After that, anyone will be able to use it to split packages they understand. When I wanted to stabilize this, I was plagued by the scope of breakage in packages that were split and broken by it (e.g. systemd+udev proved to be painful). |
So I took a look at this last week (branch at https://github.com/dezgeg/nixpkgs/commits/multiple-outputs-v2) and while the merge conflicts were indeed pretty bad, this isn't a totally lost cause (it does boot in Virtualbox for me, and at least
|
Close #9935. I don't think it's good to split thunarx into a separate derivation in this way. We would have the library and associated stuff twice and two expressions, etc. Distributions do these things by an analogy to multiple-output derivation (Debian does, for example), so we could use that, but it doesn't seem important in this case and would be better after #7701 anyway.
Close NixOS#9935. I don't think it's good to split thunarx into a separate derivation in this way. We would have the library and associated stuff twice and two expressions, etc. Distributions do these things by an analogy to multiple-output derivation (Debian does, for example), so we could use that, but it doesn't seem important in this case and would be better after NixOS#7701 anyway.
@dezgeg: thank you! I'm wading through the branch again, and I do find your commits useful. I'll be integrating them. You haven't resolved the udev/systemd issues, right? I'm thinking of unsplitting it and perhaps using a separately built libudev in dependencies or something. |
Nope, I didn't even try fixing udev/systemd. |
So, now I'm running my NixOS on this branch!
The switch to gcc-5 (and others) are queued for evaluation on staging now, so I don't expect staging this PR before we stabilize that a bit. Also, I merged latest systemd branch into this one (due to possible interactions with that udev rework). |
…tation ccacheStdenv: provide working example config in docs
khard: 0.8.1 -> 0.9.0
libinput: 1.2.1 -> 1.2.2, propagate udev dependency
wayland: 1.9.0 -> 1.10.0, weston: 1.9.0 -> 1.10.0, wayland-protocols: init at 1.3
minidlna: logging via journalctl, use systemd runtimedirectory, install manpages
Is not used according to source code
I think this branch is stable enough to go to master, so I'll resolve conflicts and merge it to staging now. That's because there's a security mass rebuild in staging that hasn't started rebuilding yet, and I don't want to build both mass rebuilds separately. People wanting to avoid breakages can switch to 16.03... |
Comparison to master evaluations on Hydra: - 1255515 for nixos - 1255502 for nixpkgs
: -) |
I cancelled the closure-size jobset on hydra. Thanks! On Sun, 10 Apr 2016, 10:42 Kosyrev Serge, [email protected] wrote:
|
It's happening........... thanks a lot for the hard work. |
I don't want to spam this thread with congratulations but I can't keep myself from doing this ~_^. Thank you very much -- and now we can share the burden of fixing what broke and also enjoy the benefits of this wonderful work! |
Great job!! |
On Hydra closure-size branch is not yet cancelled (or at least looks so) -- should it be like this? |
The closure-size branch contains the same tree as staging, so it won't really matter. I had cancelled all scheduled builds when I merged (on staging and closure-size). |
... needed after closure-size merge (#7701)
How does {
libxml2Python = pkgs.buildEnv { # slightly hacky
name = "libxml2+py-${self.libxml2.version}";
paths = with libxml2; [ dev bin py ];
inherit (libxml2) passthru;
# the hook to find catalogs is hidden by buildEnv
postBuild = ''
mkdir "$out/nix-support"
cp '${libxml2.dev}/nix-support/propagated-build-inputs' "$out/nix-support/"
'';
};
} Is not it enough to add Why does not the |
@jtojnar: I think that
|
(descriptions will be updated in-place)
Current status
Current merge blocker:
Minor stuff (not blocking merge to master)