21 Jul 2025 |
connor (he/him) (UTC-7) | tomberek you might be interested in this — I know I talked with you about having an import cache which stores the processed AST instead of the file itself. (One idea I had was to key on the hash of the AST so formatting wouldn’t cause cache misses.) | 14:44:35 |
toonn | .oO(Unison...) | 14:45:29 |
emily | see https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$ynuYm1cT2gUMemb4CiyueY7KlkO0yqppb8i9xb6ENJ8?via=nixos.org&via=matrix.org&via=nixos.dev for my attempts | 14:48:07 |
emily | unfortunately to trace builtins.readFile you need scopedImport which slows things down a bunch | 14:48:23 |
magic_rb | In reply to @emilazy:matrix.org unfortunately to trace builtins.readFile you need scopedImport which slows things down a bunch Well, it would have to be done at the c++ level and the evaluator would have to become serializable for my idea to work | 14:54:00 |
emily | yes, that would be better | 14:54:20 |
emily | serializing eval state will be really hard and complicated. I'd recommend focusing on just smarter cache keys | 14:54:42 |
emily | roberth | 14:54:53 |
emily | oops | 14:54:56 |
emily | roberth's proposal is basically what strace/preload/FUSE/etc. build systems do | 14:55:09 |
emily | storing a log of "syscalls" and using that to cache builds | 14:55:33 |
emily | but more major refactor than just "log the obvious places files are accessed and use those as part of a cache key". but the latter is fatal if you miss anything anywhere, because we end up back in make clean territory | 14:56:05 |
emily | (that's why I was trying it for the direnv layer, where we already accept imperfection) | 14:58:49 |
pveierland | Using nix repl 2.28.3 the following evaluates: { "foo" = 42; } however the following does not: { ''foo'' = 42; } and { https://foo = 42; } | 21:44:41 |
pveierland | Are string literals used in names for attribute sets limited to the double quoted form? | 21:45:48 |
pveierland | Based on the documentation it appears that any string should parse: https://nix.dev/manual/nix/2.30/language/identifiers.html?highlight=name#names | 21:46:38 |
Sergei Zimmerman (xokdvium) | Attribute keys in the grammar can only be identifiers, strings or dynamic attributes (interpolation inside dollar curlies). https://github.com/NixOS/nix/blob/6ec50ba73664838993d645dc78c936542eb2012c/src/libexpr/parser.y#L485-L494 | 22:29:45 |
Sergei Zimmerman (xokdvium) | So yeah, string literals are limited to double quotes. | 22:30:48 |
fzakaria | i'm planning to pickup another FetchTree PR tonight; | 23:21:03 |
fzakaria | another hack session. | 23:21:06 |
fzakaria | * i'm planning to pickup another FetchTree issue tonight; | 23:21:13 |
fzakaria | Sergei Zimmerman (xokdvium): any more changes for https://github.com/NixOS/nix/pull/13456 ? | 23:31:14 |
| @jovalie:matrix.org joined the room. | 23:47:51 |
22 Jul 2025 |
Sergei Zimmerman (xokdvium) | Seems ok after skimming through the fetchGit code. Though it'd be nice if someone more knowledgeable wrt to fetchers would also take a look (seems like Tom reviewed the PR prior to this one). | 00:03:23 |
fzakaria | Thanks for the review; yea okay -- i'll bug him :P | 03:03:38 |
fzakaria | it's a test case -- I actually found it trying to look into another bug.. the whole caching thing via git... is kind of whacky | 03:03:57 |
fzakaria | Not sure how to tamp down the complexity though | 03:05:07 |
fzakaria | Feeling good 💪
got another bug fixed https://github.com/NixOS/nix/pull/13521 (with a unit test rather than a functional test!) | 05:01:40 |
fzakaria | bug since 2.18.5 | 05:02:03 |
23 Jul 2025 |
mrdev023 | Someone can review my MR https://github.com/NixOS/nixpkgs/pull/421742 | 07:50:32 |