!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

784 Members
For people hacking on the Nix package manager itself168 Servers

Load older messages


SenderMessageTime
25 Nov 2024
@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
@p14:matrix.orgp14That would be super cool.20:01:26
@emilazy:matrix.orgemilyit's a shame that Unix ended up with this model where you have the runtime executable code and the linker ABI information in the same file, even though the compilation stage just doesn't care about the former at all20:01:54
@emilazy:matrix.orgemilythe LLVM stub stuff is cool but it still essentially involves making hack ELF files to get tools to cooperate20:02:10
@p14:matrix.orgp14 John Ericson: i am excited to see work being thought about in the CA world. Really want to see this happen. 20:02:21
@emilazy:matrix.orgemilymacOS is ahead here – all the system libraries ship as YAML stub files that just list symbols in the official SDKs20:02:26
@trofi:matrix.orgtrofi
In reply to @Ericson2314:matrix.org
I know finally understand what trofi was doing long ago in mkDerivation, and I agree that's the right thing to do for now
Restored as https://github.com/NixOS/nixpkgs/pull/359098 :)
20:14:41
@Ericson2314:matrix.orgJohn Ericson trofi: I think it can go directly to master, no? 20:21:58
@Ericson2314:matrix.orgJohn Ericsonnot an official mass rebuild :)20:22:02
@p14:matrix.orgp14
In reply to @emilazy:matrix.org
would be cool to see your prototype
https://gist.github.com/pwaller/31501f4068dfd0f94d867a1aa2cc0be8
20:36:01
@p14:matrix.orgp14Annoyingly, can't put a directory in a gist, so settled on txtar instead.20:36:42
@p14:matrix.orgp14The next trick will be to write this as an overlay, stdenvStage, or minimal patch against nixpkgs that does this to everything through arcane magic.20:37:25
@emilazy:matrix.orgemily I think you can – just add multiple files and it can be git cloned? 20:37:34
@emilazy:matrix.orgemilywe need some of this ANSI art in Nixpkgs20:37:39
@p14:matrix.orgp14:D20:37:44
@p14:matrix.orgp14You can put multiple files in, but not multiple directories. They get rejected by the git remote when you try to push them.20:37:59
@p14:matrix.orgp14It was a fun little exercise but I can see there is quite a bit more work involved even when it comes to handling a single package. I'm actually not sure what to reach for to do something as simple as replacing nix paths in a binary; patchelf obviously is the thing to reach for when the strings appear in a specific place, but substituteAll barf'd on the null characters.20:39:53
@emilazy:matrix.orgemily I think Nixpkgs just uses sed for that 20:40:30

Show newer messages


Back to Room ListRoom Version: 6