!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

222 Members
71 Servers

Load older messages


SenderMessageTime
5 Jan 2025
@emilazy:matrix.orgemily(what I mean is, I'm of course partially looking for feedback from people with a better sense of the likely consequences than me, but also I think starting to make judgement calls and seeing how they end up is the only way you develop that sense in the first place.)18:57:46
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) Well then ;)
Does anyone have thoughts on https://github.com/NixOS/nixpkgs/pull/370750 or https://github.com/NixOS/nixpkgs/pull/370742?
18:57:53
@emilazy:matrix.orgemily I saw these while trawling through open staging PRs for the upcoming cycle but mainly concluded "nope, not right before we dive into another staging-next" 😅 18:58:42
@emilazy:matrix.orgemily I'd really like @nix-based unconditional logging filtered on the client so that you can access verbose stuff without fussing around with stdenv overrides 18:59:04
@emilazy:matrix.orgemilynot that that should block incremental improvements in the meantime18:59:10
@emilazy:matrix.orgemilythe hook seems like a good idea to me19:00:06
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) Oh you mean like structured JSON logging? I had tried to do stuff with the @nix formatting but I didn’t like what the result looked like and templating JSON from bash is tricky, so it just does plain text logging 19:00:07
@emilazy:matrix.orgemilynot structured per se19:00:28
@emilazy:matrix.orgemily just using @nix to signal a log level and message, so that nix build/nix log can show your desired logging level without needing a rebuild 19:00:43
@emilazy:matrix.orgemilythat would require getting changes in Nix though 🙃19:00:53
@emilazy:matrix.orgemilythis came up back when we had really verbose logging for hooks on by default19:01:01
@emilazy:matrix.orgemilywhich is useful to debug things without rebuilding the world but was really unpleasant most of the time19:01:10
@emilazy:matrix.orgemilybasically ideally we shouldn't be deciding to filter at build time but on the viewing end19:01:23
@emilazy:matrix.orgemily(except for things so spammy that they might slow down a build appreciably to even shove through a pipe)19:01:35
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)Ahhhhh yeah! It’d be particularly nice if there were an option to always capture the most verbose output in a build log file on disk (which could be compressed) while the content printed out was filtered for the current log level19:02:21
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)lol agreed took me longer to type out the same thing19:02:50
@emilazy:matrix.orgemilyright.19:02:50
@emilazy:matrix.orgemilyI think most of the pieces are there already, it just needs implementing19:03:02
@emilazy:matrix.orgemilyhere's some historical context19:03:33
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/issues/328229 https://github.com/NixOS/nixpkgs/pull/331560 https://github.com/NixOS/nixpkgs/pull/33179419:03:51
@emilazy:matrix.orgemily

Both projects support structured output logging (through the @nix { "action": "msg", "level": "[0-7]", "msg": "some message" } special messages output to the file descriptor that $NIX_LOG_FD points to.

19:04:46
@emilazy:matrix.orgemilyIMO this would be very high value if someone managed to get it into Nix/Lix19:05:10
@emilazy:matrix.orgemily because rebuilding with a higher NIX_DEBUG just to check some build issue sucks 19:05:19
@emilazy:matrix.orgemilywe would have to check how much overhead even processing/storing/discarding the logs would be and there's even considerations like Hydra's web interface, but it would be really great19:05:39
@emilazy:matrix.orgemilyanyway, like I said enough of a task that it shouldn't block incremental improvements :)19:05:47
@emilazy:matrix.orgemilybut I don't think it would be an immense amount of implementation work and the benefits would be huge19:06:02
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)Wouldn’t that change need to be backported through Nix 2.3?19:48:29
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)* Wouldn’t such changes need to be backported through Nix 2.3?19:49:40
@emilazy:matrix.orgemilyI don't think so – spammy build output isn't a compatibility break19:50:36
@emilazy:matrix.orgemily(but we should bump minver to 2.18 anyway, it was discussed on a recent structured attributes PR…)19:50:46

Show newer messages


Back to Room ListRoom Version: 9