!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

837 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.180 Servers

Load older messages


SenderMessageTime
21 Jul 2025
@connorbaker:matrix.orgconnor (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:matrix.orgtoonn .oO(Unison...) 14:45:29
@emilazy:matrix.orgemilysee https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$ynuYm1cT2gUMemb4CiyueY7KlkO0yqppb8i9xb6ENJ8?via=nixos.org&via=matrix.org&via=nixos.dev for my attempts14:48:07
@emilazy:matrix.orgemily unfortunately to trace builtins.readFile you need scopedImport which slows things down a bunch 14:48:23
@magic_rb:matrix.redalder.orgmagic_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
@emilazy:matrix.orgemilyyes, that would be better14:54:20
@emilazy:matrix.orgemilyserializing eval state will be really hard and complicated. I'd recommend focusing on just smarter cache keys14:54:42
@emilazy:matrix.orgemilyroberth14:54:53
@emilazy:matrix.orgemilyoops14:54:56
@emilazy:matrix.orgemilyroberth's proposal is basically what strace/preload/FUSE/etc. build systems do14:55:09
@emilazy:matrix.orgemilystoring a log of "syscalls" and using that to cache builds14:55:33
@emilazy:matrix.orgemily 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
@emilazy:matrix.orgemily(that's why I was trying it for the direnv layer, where we already accept imperfection)14:58:49
@pveierland:matrix.orgpveierland 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:matrix.orgpveierlandAre string literals used in names for attribute sets limited to the double quoted form?21:45:48
@pveierland:matrix.orgpveierlandBased on the documentation it appears that any string should parse: https://nix.dev/manual/nix/2.30/language/identifiers.html?highlight=name#names21:46:38
@xokdvium:matrix.orgSergei 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-L49422:29:45
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)So yeah, string literals are limited to double quotes.22:30:48
@fzakaria:one.ems.hostfzakariai'm planning to pickup another FetchTree PR tonight; 23:21:03
@fzakaria:one.ems.hostfzakariaanother hack session.23:21:06
@fzakaria:one.ems.hostfzakaria* i'm planning to pickup another FetchTree issue tonight; 23:21:13
@fzakaria:one.ems.hostfzakaria Sergei Zimmerman (xokdvium): any more changes for https://github.com/NixOS/nix/pull/13456 ? 23:31:14
@jovalie:matrix.org@jovalie:matrix.org joined the room.23:47:51
22 Jul 2025
@xokdvium:matrix.orgSergei 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:one.ems.hostfzakariaThanks for the review; yea okay -- i'll bug him :P03:03:38
@fzakaria:one.ems.hostfzakariait's a test case -- I actually found it trying to look into another bug.. the whole caching thing via git... is kind of whacky03:03:57
@fzakaria:one.ems.hostfzakariaNot sure how to tamp down the complexity though03:05:07
@fzakaria:one.ems.hostfzakariaFeeling 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:one.ems.hostfzakariabug since 2.18.505:02:03
23 Jul 2025
@mrdev023:matrix.orgmrdev023Someone can review my MR https://github.com/NixOS/nixpkgs/pull/42174207:50:32

Show newer messages


Back to Room ListRoom Version: 6