!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

903 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
8 Jun 2021
@manveru:matrix.orgmanveruanyway, here's my PR: https://github.com/NixOS/nix/pull/489508:37:46
@manveru:matrix.orgmanveruhm, i see, most other tests are ad-hoc shell scripts as well08:40:00
@manveru:matrix.orgmanveruok, got a working test now as well :)09:03:14
@manveru:matrix.orgmanveruthanks a lot09:03:16
@theophane:hufschmitt.netRegnat niksnut Looking at the GC again, is it correct that Exprs are generally leaking? 17:09:09
@niksnut:matrix.orgniksnutIt's by design17:09:51
@niksnut:matrix.orgniksnutThere is basically no point in GC'ing ASTs17:11:08
@niksnut:matrix.orgniksnutSince they generally exist for the duration of the program17:11:30
@theophane:hufschmitt.netRegnatOh, do they? I kind-of assumed that once a thunk is evaluated, the underlying AST isn’t used anymore (and is unreachable anyways)17:29:18
@theophane:hufschmitt.netRegnatI’ll have to review my understanding of the evaluator then 🤔17:34:01
@niksnut:matrix.orgniksnutAST nodes are shared by all the thunks that refer to them17:46:32
@niksnut:matrix.orgniksnutAnd there is a file cache, so if you import a file twice you get the same AST17:47:00
@niksnut:matrix.orgniksnutBut the most important thing is that AST memory usage is bounded by the set of Nix expressions imported17:48:16
@niksnut:matrix.orgniksnutUnlike values, of which there can be arbitrarily many during an eval17:48:42
@theophane:hufschmitt.netRegnat
In reply to @niksnut:matrix.org
But the most important thing is that AST memory usage is bounded by the set of Nix expressions imported
Ahah, yes, that’s true
18:09:41
@theophane:hufschmitt.netRegnatI wonder though whether there’s something to gain from freeing them at the end of the eval… but given that there’s no clear point where we finish the eval, it probably doesn’t make much sense18:10:54
9 Jun 2021
@matto153:matrix.orgmatto153 joined the room.08:06:21
@matto153:matrix.orgmatto153Hello all08:17:41
@joerg:bethselamin.deMic92I assume flakes cannot have git submodules?11:42:14
@manveru:matrix.orgmanveru Mic92: they can... but it's a major PITA 11:50:42
@manveru:matrix.orgmanveruyou basically have to import self with fetchGit and submodules11:51:11
@joerg:bethselamin.deMic92 manveru: do you have an example? 11:51:29
@manveru:matrix.orgmanveruand it only works if the dir isn't dirty :P11:51:33
@manveru:matrix.orgmanveru fullself = builtins.fetchGit { url = "https://whatever"; ref = "master"; rev = self.rev; submodules = true; }; 11:52:41
@manveru:matrix.orgmanverukinda like that11:52:48
@joerg:bethselamin.deMic92Ok. I see the problem11:53:32
@manveru:matrix.orgmanveruof course that only works with master branch, because Nix can't get revs from undefined branches...11:53:41
@manveru:matrix.orgmanveru and self.rev is only set if the flake isn't dirty 11:53:54
@joerg:bethselamin.deMic92the whole flake or just the submodule?11:54:08
@joerg:bethselamin.deMic92 If the whole flake needs to be clean than this is useless 11:54:52

Show newer messages


Back to Room ListRoom Version: 6