Nix Hackers | 973 Members | |
| For people hacking on the Nix package manager itself | 207 Servers |
| Sender | Message | Time |
|---|---|---|
| 7 Oct 2021 | ||
Before diving into doing the change I had a thought yesterday while looking at related code: Any reason we don't implement Expr{Sub,Add,...} like we do for ExprNotOp etc? In the case of subtraction it could get rid of about 30k Symbol table looks, a few thousand new objects and execution wouldn't probably do a few less function calls. That would probably break overriding substraction by providing a __sub (or whatever) function in the current scope (if that even works right now). | 14:58:58 | |
In reply to @balsoft:balsoft.ruInterestingly, I think it never happens once logs for the derivation were shown at least once | 14:59:15 | |
* Before diving into doing the change I had a thought yesterday while looking at related code: Any reason we don't implement Expr{Sub,Add,...} like we do for ExprNotOp etc? In the case of subtraction it could get rid of about 30k Symbol table looks, a few thousand new objects (while building a NixOS test). And execution wouldn't probably do a few less function calls. That would probably break overriding substraction by providing a __sub (or whatever) function in the current scope (if that even works right now). | 14:59:20 | |
| I don't mind at all if this ends up in the release, but just wanted to note that it happens sometimes | 15:01:23 | |
| niksnut: any chance we could get a 2.3 release or merge this? https://github.com/NixOS/nixpkgs/pull/137197 I think it should fix the errors we're seeing on https://r13y.com | 15:03:53 | |
| Sure, I can do a release | 15:04:16 | |
In reply to @andi:kack.itNo, I think the reason it's implemented that way is because builtins.sub etc. already existed | 15:14:19 | |
In reply to @niksnut:matrix.org Would you see any downside to adding those implementations? I could have a go on the in one of the coming evenings. I don't think that it will improve performance by a lot but I also haven't measured the time spent in those functions. I was just surprised that IIRC the sub primop was the most used one (by a few 10k) when I did eval a NixOS VM test. | 15:16:49 | |
| The only downside is that it's a bit more code | 15:17:36 | |
| musl issue is related to: 4993174 | 15:19:43 | |
In reply to @niksnut:matrix.org2.3.16 is up | 15:36:21 | |
In reply to @tomberek:matrix.orgOkay, we could revert that | 15:37:09 | |
| niksnut: thank you so much! | 15:54:59 | |
| I've created a 2.4-maintenance branch and a hydra jobset | 15:57:10 | |
| I'll do a rc1 release for testing | 15:57:19 | |
| @niksnut I've pushed the nix bump on https://github.com/NixOS/nixpkgs/pull/137197 Is that alright? or do you want to split in another PR? | 16:08:15 | |
| it adds a nixos integration tests, that checks the nss preload works as expected | 16:08:55 | |
| maybe it's better to add the test to nix rather than nixos | 16:09:43 | |
| is there any qemu based test infrasture in nix? | 16:10:31 | |
| * is there any qemu based test infrastructure in nix? | 16:10:47 | |
| because I really have no idea how to test this expect the way I implemented it with 2 vms | 16:11:18 | |
| (or two namespaces would work too) | 16:11:43 | |
| yes, we have several NixOS VM tests in the nix repo | 16:12:00 | |
| like tests.githubFlakes | 16:12:20 | |
| the question is really whether this test serves more as a regression test for nix or for nixos | 16:12:46 | |
| if this is something that can break in nix, the test should be in the nix repo ideally | 16:13:06 | |
| this is definitely better suited in nix itself | 16:13:24 | |
| example: https://github.com/NixOS/nix/blob/master/tests/remote-builds.nix | 16:13:47 | |
| ha, I was still on the 2.3 branch >< | 16:15:09 | |
| https://github.com/NixOS/nixpkgs/pull/140868 for the nix2.3 bump | 16:20:42 | |