Nixpkgs Architecture Team | 227 Members | |
| https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture | 53 Servers |
| Sender | Message | Time |
|---|---|---|
| 3 Oct 2023 | ||
| DavHau: Sorry we didn't have time today, do you have a link to check out what you wanted to show? | 14:54:23 | |
| DISCLAIMER: This is just an experiment I made this fork of nixpkgs, which uses the module system for all mkDerivation based packages. All changes are contained in the latest commit. Done:
Example usage: Overridingoverriding before:
overriding after:
Type Checking
Performance(None of these findings are thoroughly tested or statistically sound)
Other findings:
My main question is: What are the next steps? Is there something useful to make out of this?
| 16:25:19 | |
| DavHau: Nice! This would be great to have in a GitHub issue, in Matrix it's easily lost. I'd like some more detailed benchmarks, including what exactly is being benchmarked (is it the same that ofborg uses? that would be a good indication). Also not just time (I assume that's what you measured), but also memory usage. Just from the numbers you gave though, I think this clearly demonstrates that it's too inefficient and we really need to improve performance of the module system to make this work. | 16:34:20 | |
Possibly overhead can be further reduced by avoiding evalModules ("types.submodule") in favor of something simpler like types.fix (types.record) but also extensible | 16:34:41 | |
| It'd be somewhere between the module system and minimod I guess | 16:35:06 | |
| Yes, I just measured the time. I haven't much experience on how to do proper benchmarks with nix. Any hints or docs regarding this are appreciated. I can look at ofborgs implementation I guess. | 16:38:17 | |
| Here's an example of ofborg's performance report: https://github.com/NixOS/nixpkgs/pull/258804/checks?check_run_id=17356593009 | 16:38:34 | |
ofborg just renders NIX_SHOW_STATS=1, but is not a serious benchmarking tool | 16:39:03 | |
| Concerning the github issue, should I open one on nixpkgs-architecture? I could also open a WIP PR on nixpkgs, but the thing is based on another WIP branch of robert, therfore not sure. | 16:39:44 | |
That PR might stall for a while until we figure out how to communicate | 16:41:07 | |
*
That PR might stall for a while until we figure out how to communicate | 16:41:18 | |
| It's fine to include those commits in your PR. It's a point in time kind of thing anyway | 16:42:36 | |
| 21:04:17 | ||
| 4 Oct 2023 | ||
| 22:20:24 | ||
| Small but nice: https://github.com/NixOS/nixpkgs/pull/259074 | 22:22:24 | |
| 5 Oct 2023 | ||
| 10:11:38 | ||
| 6 Oct 2023 | ||
| Merged it myself, it's small enough and I tested it well enough that I felt confident doing that :) | 03:35:32 | |
| 9 Oct 2023 | ||
infinisil: Lol your pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/pkgs/by-name/fo/foo/package.nix/default.nix pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/pkgs/by-name/fo/foo/foo.nix tests cause errors in nixpkgs-lint https://github.com/nix-community/nixpkgs-lint/blob/master/src/find.rs | 07:10:19 | |
* infinisil: Lol your pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/pkgs/by-name/fo/foo/package.nix/default.nix pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/pkgs/by-name/fo/foo/foo.nix tests cause errors in nixpkgs-lint https://github.com/nix-community/nixpkgs-lint/blob/6af572ac6994d9919bcb54578eb8430bcbf1f6e0/src/find.rs | 07:29:33 | |
| * infinisil: Lol your fixed https://github.com/nix-community/nixpkgs-lint/commit/f56d5c4efb3bb3cdb2ab46fda8c598105d6e8af1 | 07:35:04 | |
In reply to @artturin:matrix.orgHaha nice | 07:55:42 | |
| 10 Oct 2023 | ||
| 03:39:06 | ||
| 03:39:26 | ||
| 11 Oct 2023 | ||
I find this a bit silly, since I'm simply inheriting all attributes from the attrset. This is noisy, adds churn and is error-prone. I know that using something like by-name isn't a thing yet for package sets, but why couldn't I just | 14:35:32 | |
piegames: That would give you infinite recursion, because the attribute names of an overlay now depends on final | 14:36:15 | |
Ah and also as I've recently learned, the above is sub-optimal in the current Nix interpreter, because it will stupidly re-do the callPackage import for every single attribute | 14:36:20 | |
In reply to @infinisil:matrix.orgUm, I don't understand that | 14:36:38 | |
piegames: I guess here's a way to show the problem: What if the gnome extensions set defines callPackage = ? | 14:40:02 | |
| Hm, fair. Can we somehow prevent that with some infrastructure? Some helper function which says "import everything from here into our attrset, and make sure to use super.callPackage to avoid infinite recursion" | 14:42:49 | |
On the other hand, shouldn't this still work as long as the package set doesn't define a callPackage? Because stuff is lazy etc. | 14:43:28 | |