!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

901 Members
For people hacking on the Nix package manager itself189 Servers

Load older messages


SenderMessageTime
15 Mar 2025
@emilazy:matrix.orgemilyis varlink any better than JSON for byte canonicity?14:51:30
@emilazy:matrix.orgemilyor is that no longer a requirement?14:52:16
@emilazy:matrix.orgemilyah, I guess this is separate :)14:52:25
@emilazy:matrix.orgemilyfwiw, (c) seems like the most elegant solution to me.14:55:05
@emilazy:matrix.orgemilythough it's a bit weird to be able to chain it like that.14:55:32
@roberthensing:matrix.orgroberthSomething does seem elegant about (c), putting this capability in its own separate derivation, but it isn't clear to me which is a better UX and whether there's differences in performance between the solutions, especially wrt binary cache roundtrips. I feel like (d) is closer to the "deep realisation" idea, but I don't know whether that's inconsequential, better or worse.15:29:24
@roberthensing:matrix.orgroberthI think byte canonicity might not be a problem in this case, as long as clients in the builder don't try to do their own hashing, which they really don't need to when the endpoint returns the relevant hashes anyway15:30:37
@roberthensing:matrix.orgroberthOnly the Nix implementations need to get this right, which seems feasible15:31:25
@emilazy:matrix.orgemily how does outputOf currently get represented in the derivation? 15:34:39
@roberthensing:matrix.orgroberthjust in the inputs. We use a semistructured ATerm for the derivation references field, and iirc store-path-shaped placeholders in the other attributes15:38:54
@emilazy:matrix.orgemily if the separate derivation is considered a problem, perhaps "join the output" could be a field on the .drv itself? 15:40:02
@emilazy:matrix.orgemily you would still need a cp derivation for the arbitrary case to reconstruct (c) though 15:40:12
@roberthensing:matrix.orgroberth Not a fan of the Go types schema language, but otherwise it looks alright. Could be combined with JSON schema perhaps, via varlink's catch-all object 15:42:50
@roberthensing:matrix.orgroberth That's sort of what I had in mind for (d), declare statically with an "advanced attr" that an output is a redirect (or may be a rewrite) and then the builder would write to $out or $outRewriteor something.echo $drv^out >$outRewrite` 15:50:30
@roberthensing:matrix.orgroberth * That's sort of what I had in mind for (d), declare statically with an "advanced attr" that an output is a redirect (or may be a rewrite) and then the builder would write to $out or $outRewriteor something.echo $drv^out >$outRewrite\ 15:50:41
@roberthensing:matrix.orgroberth * That's sort of what I had in mind for (d), declare statically with an "advanced attr" that an output is a redirect (or may be a rewrite) and then the builder would write to $out or $outRewriteor something.echo $drv^out >$outRewrite 15:50:49
@emilazy:matrix.orgemily

especially wrt binary cache roundtrips

the output of a join drv would be the actual final output, right? so if the output is cached no additional roundtrips? I may be misunderstanding though, is this when a cache has .drvs but no outputs? is that common?

16:20:06
@emilazy:matrix.orgemilymy feeling is that having a zillion tiny derivations should be made to be fast/good anyway because the more fancy incremental stuff you do the more you'll want that anyway16:20:50
@emilazy:matrix.orgemilyor do you mean when pushing outputs?16:29:41
16 Mar 2025
@jade_:matrix.orgjade_i currently do not have the brain space to fully think out how the dyndrv ideas work, but i will say that, as puck mentioned in lix dev a while ago, it could be the case in the future that we allow for input addressed drvs with different drv hashes to resolve to the same output hash for stuff like provenance metadata and other use cases like that where it does not affect the build itself, in the same way as fods currently allow. so having to generate the drvs from inside a dyndrv could be a trouble for the extension of the drv format?01:48:45
@roberthensing:matrix.orgroberthyou're considering this? https://github.com/NixOS/nix/issues/10780 10:29:28
@roberthensing:matrix.orgroberthit's already the case that drv hashes aren't 1:1 with input addressed output hashes, due to modulo hashing and FODs that occur in the derivation closure10:29:37
@puck:puck.moepuckbasically, yeah. i think .drv files (and, to some degree, their format) are distinct from "derivations" in a way that makes sense to rethink what they are and look like, because .drv files' hashes aren't stable to begin with10:31:42
@roberthensing:matrix.orgroberthI don't think generating drvs inside there has to be a problem, as presumably you could canonicalize them on the nix side?10:31:44
@roberthensing:matrix.orgroberthyeah, the issue tries to be more incremental in terms of change, but yeah, we basically could have a pipeline like exprs -eval-> instantiations of any suitable format -canonicalize-> derivations -build-> outputs10:34:34
@roberthensing:matrix.orgroberthor variations of that10:35:04
@0xcaff:matrix.orgMartin Charles joined the room.17:58:53
@Ericson2314:matrix.orgJohn Ericson hexa: We would like to no more about the bug that caused the builders to go to Lix 18:59:34
@Ericson2314:matrix.orgJohn Ericsonthat earlier github thread went of the rails, but the original idea of having some more information written down still stands19:00:02
@Ericson2314:matrix.orgJohn Ericson Thanks to infinisil (!) I got a link that works on the element electron app to the prior conversation in infra #infra:nixos.org, the link is: https://matrix.to/#/!RROtHmAaQIkiJzJZZE:nixos.org/$G9MBOn9CfSLkLiPqMhoN7KMnBEl6R4uRkLbFBm_KWBs?via=nixos.org&via=matrix.org&via=nixos.dev 19:37:51

Show newer messages


Back to Room ListRoom Version: 6