!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

950 Members
For people hacking on the Nix package manager itself199 Servers

Load older messages


SenderMessageTime
25 Nov 2024
@Ericson2314:matrix.orgJohn Ericson emily: check out https://github.com/NixOS/nix/issues/11954 and https://github.com/NixOS/nix/issues/11955 re those CA derivation Nixpkgs PRs btw 19:09:59
@Ericson2314:matrix.orgJohn Ericson I know finally understand what trofi was doing long ago in mkDerivation, and I agree that's the right thing to do for now 19:10:24
@Ericson2314:matrix.orgJohn EricsonI think I have a decent plan for making things optimized in the CA world, but it should wait until after CA stabilization19:10:58
@emilazy:matrix.orgemilythat quasi-derivation stuff makes me think about Ninja validations (probably because I was just talking about them rather than because they're super directly related, but they do involve tweaking build graph semantics), do you know about those?19:27:28
@Ericson2314:matrix.orgJohn Ericson emily: oh I don't know those 19:28:23
@Ericson2314:matrix.orgJohn Ericsonsounds like a good thing to read about ;)19:28:28
@Ericson2314:matrix.orgJohn Ericson * sounds like a good thing to read about :)19:28:32
@emilazy:matrix.orgemily
In reply to @Ericson2314:matrix.org
emily: oh I don't know those
https://ninja-build.org/manual.html#validations basically, we could extend the build graph with nodes that you can attach to another node that
(a) run after that node's completion and get to use its outputs;
(b) don't block the builds of things downstream of that node; but
(c) if they fail, the node they're attached to itself is considered to have failed
19:29:35
@emilazy:matrix.orgemilyin a world where we split up check phases from main derivations, this would mean that you could run LLVM's tests in parallel with building things that use that LLVM19:29:54
@Ericson2314:matrix.orgJohn Ericsonoh interesting point via speculative execution19:30:03
@emilazy:matrix.orgemilyand have it and everything downstream be considered to have failed if the tests fail19:30:07
@Ericson2314:matrix.orgJohn Ericsonthat's great19:30:11
@emilazy:matrix.orgemilycurrently lots of things are blocked on slow tests19:30:13
@emilazy:matrix.orgemilywe could gain a huge amount of parallelization if tests were taken out of the critical path entirely like this19:30:24
@Ericson2314:matrix.orgJohn Ericsonfor tests I was just thinking "well, depend on the underlying builds at your own risk"19:30:33
@Ericson2314:matrix.orgJohn Ericsonbut yes this could be used with that19:30:40
@emilazy:matrix.orgemilyyeah, but if you avoid depending on the underlying derivation it still means that tests become a blocking thing :)19:30:56
@emilazy:matrix.orgemily(this came up in the context of a long discussion about dynamic library stubs / relinking to avoid mass rebuilds from ABI-compatible library changes, https://discourse.nixos.org/t/why-does-the-nixos-infrastructure-have-to-be-hosted-in-a-centralized-way/46789/32 onwards but it's quite long)19:31:49
@emilazy:matrix.orgemilyanyway, +1 to everything that gets rid of the phantom dependencies at the Nix level19:32:04
@apurba007:matrix.org@apurba007:matrix.org left the room.19:34:49
@p14:matrix.orgp14 emily: I did a small poc of this over the weekend. And looked into the effects. It looks like a plausible thing to me. Interesting question of how/whether it can be wired into nixpkgs in general without it requiring a big-bang rewrite. 19:48:30
@p14:matrix.orgp14It is very cool watching a dependency rebuild but seeing an instant relink for an expensive to build dependent.19:49:33
@emilazy:matrix.orgemilynice19:50:26
@emilazy:matrix.orgemilywould be cool to see your prototype19:50:29
@p14:matrix.orgp14Afk right now, will get back to you on that.19:51:19
@Ericson2314:matrix.orgJohn Ericson @emilazy:matrix.org I like your thinking in that thread. I agree the interesting thing is not perfect minimal rebuilds, but separating concerns purely at scale 19:58:17
@emilazy:matrix.orgemily my ideal is to get away from staging entirely and do everything as a bors-style merge queue where every single change leaves everything green, but even applying all the ideas in that thread to the maximum extent probably still leaves a very substantial gap away from making that viable :) 19:59:50
@emilazy:matrix.orgemily but it's frustrating that we at least have a way to deploy one-byte security patches to libraries at scale that doesn't involve compromising the model like replaceDependencies but – we don't do it 20:00:19
@emilazy:matrix.orgemily(for understandable reasons, given Nixpkgs legacy, but still.)20:00:29
@Ericson2314:matrix.orgJohn EricsonIf we make sure we don't starve the remaining mass rebuilds, I think we can do it!20:00:41

Show newer messages


Back to Room ListRoom Version: 6