!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

981 Members
For people hacking on the Nix package manager itself208 Servers

Load older messages


SenderMessageTime
26 Aug 2021
@Las:matrix.orgLasDoes anyone know why Recursive Nix is experimental?08:58:54
@gytis-ivaskevicius:matrix.orgGytis Ivaskeviciusprob due to RFC 9217:06:45
@gytis-ivaskevicius:matrix.orgGytis Ivaskeviciusit implements similar feature but it all is approached differently17:07:04
@tomberek:matrix.orgtomberek(i could be wrong here) I think there is an issue about being in a build, and then starting another one which blocks the original build until the internal one completes.17:07:56
@tomberek:matrix.orgtomberekIf you have overuse of recursive nix, this means you will have long chains of blocked builds. This is compared to the normal situation where a dependency can complete, tear down the sandbox, store results into cache, etc, and then start the next build whenever you want.17:09:29
@tomberek:matrix.orgtomberekMy mental model for this is similar to "tail-recursion optimization". That if you know that the recursion is a tail call, you can do avoid blowing up the stack by turning a function call into a jump. Recursive-nix allows for arbitrary recursion, RFC92 tries to enforce the "tail-call" style.17:11:56
@tomberek:matrix.orgtomberek * My mental model for this is similar to "tail call optimization". That if you know that the recursion is a tail call, you can do avoid blowing up the stack by turning a function call into a jump. Recursive-nix allows for arbitrary recursion, RFC92 tries to enforce the "tail-call" style.17:12:23
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusNot sure if thats how i'd call it. I'd say its more of a build scheduling17:13:51
@gytis-ivaskevicius:matrix.orgGytis Ivaskeviciusmay need to read it again17:13:57
@sternenseemann:systemli.orgsterni
In reply to @gytis-ivaskevicius:matrix.org
prob due to RFC 92
RFC 92 depends on recursive nix (albeit a more limited variant of it)
17:48:20
@gytis-ivaskevicius:matrix.orgGytis Ivaskevicius
In reply to @sternenseemann:systemli.org
RFC 92 depends on recursive nix (albeit a more limited variant of it)
yeah, John Ericson idea is "STOP WRITING SHIT CODE!!!!" :D
17:51:32
@gytis-ivaskevicius:matrix.orgGytis Ivaskevicius(sorry for the ping)17:51:42
@gytis-ivaskevicius:matrix.orgGytis Ivaskevicius(Actually I'd love to hear some update on all that 😉 )17:52:32
@Ericson2314:matrix.orgJohn Ericson:)17:52:47
@Ericson2314:matrix.orgJohn EricsonOnly news is we need more people to sign up to be shepherds17:54:22
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusI'm afraid its too big brain for me17:55:10
@tomberek:matrix.orgtomberekbtw: i took a brief stab at updating the eelco commit into the new approach of DerivationTypes, but i started wading in areas of code I think John would be 10x faster than me on.17:55:25
@tomberek:matrix.orgtomberek * btw: i took a brief stab at updating the eelco commit into the new approach of DerivationTypes, but i started wading in areas of code I think John would be 10x faster than me on. (sorry, wrong topic: this was for "impure derivations")17:56:31
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusIf anyone wishes to nominate themselves: https://github.com/NixOS/rfcs/pull/92 17:57:07
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusAlso not related but nomination or two would be nice here as well 😀 https://github.com/NixOS/rfcs/pull/9517:57:37
@Ericson2314:matrix.orgJohn Ericson Gytis Ivaskevicius feel free to bow out, but do note the first thing I would do in such meetings is try to explain the thing and make things clearer — not go straight into to deciding what we want to do with it. 18:02:02
@sternenseemann:systemli.orgsterni John Ericson: btw I noticed today that string context can't track dependencies on just derivations via string context without any outputs, I feel like that would be a required change for your thing to work 18:03:00
@sternenseemann:systemli.orgsterni i. e. context { "/my.drv" = { outputs = []; }; } is just reduced to context { } 18:03:34
@sternenseemann:systemli.orgsterniwait path = true maybe it works18:04:07
@sternenseemann:systemli.orgsterninvm18:04:37
@tomberek:matrix.orgtomberek

Not sure where to post this, but i thought here would be good:
I've often wished for being able to chop up a mkDerivation into individual phases as derivations. Something like this would create more derivations, but they would be snapshot'd between phases. Eventually you can do something like filterSource on the configurePhase such that it doesn't have to be re-run for most changes to upstream.

chopIntoPhases = drv:  
  patchPhase = ... # drv built until patchPhase completes 
  configurePhase = ... # derivation that depends on "patchPhase" and performs a configurePhase"
... and so on
18:11:15
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusI gave it some thought a while back and I feel like there are better alternatives. What usecases do you have in mind?18:14:05
@gytis-ivaskevicius:matrix.orgGytis IvaskeviciusThe real solution here is some sort of posix pipe with Nix which would allow to snapshot /build18:14:46
@tomberek:matrix.orgtomberekOne would be when iterating on tests. No need to re-do a very expensive compilePhase.18:14:55
@tomberek:matrix.orgtomberekThere are some packages for which the configurePhase is more expensive than anything else18:15:18

Show newer messages


Back to Room ListRoom Version: 6