Sender | Message | Time |
---|---|---|
18 Jul 2025 | ||
22:13:42 | ||
19 Jul 2025 | ||
In reply to @connorbaker:matrix.orgI think part of the problem is that you can't really say which files are the sourcefiles of an attribute without an evaluation, right? | 17:41:11 | |
20 Jul 2025 | ||
I think you could if using the flake interface. I've lookged through the eval-cache.cc file a bit, here's an idea.Consider the portion which involves getting the keys of an attribute set. If before and after forcing a value you were snapshot and then compare the results of the import cache, that could be a start. | 03:48:39 | |
I plan to work on that starting Sep/Oct. Might work regardless of flakes :: Bool | 15:16:39 | |
In reply to @ma27:nicht-so.sexyEvaluation should form a tree of visited files theoretically. So you could go and rehash all the files and once you find the first divergence you need to reeval (if we could take incremental snapshots of the evaluator state and flatten the visited files into a list on the time axis, you could even pick up the eval maybe from where it left off? Essentially if you change only a leaf file, you only reimport the leaf) | 15:31:04 | |
It's about time the compile times got better. Yeeted https://github.com/NixOS/nix/pull/13510 and https://github.com/NixOS/nix/pull/13512. | 19:25:10 | |
This smells much like Boost.Spirit or Boost.X3 | 20:41:54 | |
21 Jul 2025 | ||
If you’re going to NixCamp or NixCon this year, I’d love to find out more about your thoughts on how that could be implemented! | 02:34:48 | |
I'll be at NixCon. Basic idea is: refactor evaluation so that it's an interaction between these three actors and "communication links": CLI - Evaluator - OS, and nothing else. Then MITM the Evaluator on both sides by recording the interactions of previous calls to the evaluator, and replaying them if possible. | 09:05:43 | |
It's somewhat of a research project; nothing is guaranteed | 09:07:02 | |
Thats kinda what i was proposing https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$FvXA39aRGz0iER7ZM-bRtUkJCuorYa0Ecy_YupgUPC8?via=nixos.org&via=matrix.org&via=nixos.dev ill be at nixcon too. Definitely will be around for this | 09:08:24 | |
11:04:23 | ||
I’d love to talk more about this with you all! Any chance C++ has something akin to Haskell’s STM? | 14:11:52 | |
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 | |
.oO(Unison...) | 14:45:29 | |
see https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$ynuYm1cT2gUMemb4CiyueY7KlkO0yqppb8i9xb6ENJ8?via=nixos.org&via=matrix.org&via=nixos.dev for my attempts | 14:48:07 | |
unfortunately to trace builtins.readFile you need scopedImport which slows things down a bunch | 14:48:23 | |
In reply to @emilazy:matrix.orgWell, 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 | |
yes, that would be better | 14:54:20 | |
serializing eval state will be really hard and complicated. I'd recommend focusing on just smarter cache keys | 14:54:42 | |
roberth | 14:54:53 | |
oops | 14:54:56 | |
roberth's proposal is basically what strace/preload/FUSE/etc. build systems do | 14:55:09 | |
storing a log of "syscalls" and using that to cache builds | 14:55:33 | |
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 | |
(that's why I was trying it for the direnv layer, where we already accept imperfection) | 14:58:49 | |
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 | |
Are string literals used in names for attribute sets limited to the double quoted form? | 21:45:48 | |
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 | |
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 |