Sender | Message | Time |
---|---|---|
28 Jul 2024 | ||
Matt Sturgeon | Maybe the correct implementation is to define any "optional" options outside the freeform submodule, and then copy them in if defined?
Perhaps submodule sub-options are only intended to be used when the value should always be in the generated value? | 20:41:12 |
Matt Sturgeon | * Maybe the correct implementation is to define any "optional" options outside the freeform submodule, and then copy them in if defined?
Perhaps submodule sub-options are only intended to be used when the value should always be in the generated value? | 20:41:39 |
29 Jul 2024 | ||
infinisil | Related: https://github.com/NixOS/nixpkgs/pull/63553 | 23:08:02 |
infinisil | And https://github.com/NixOS/nixpkgs/issues/158594 | 23:09:27 |
30 Jul 2024 | ||
Matt Sturgeon | Thanks, those links are insightful! I think 158598 is also related, but 158594 sounds like exactly what I want:
But it looks like the latest comment is backtracking or downscaling that idea... Playing around in the repl, I can get I guess to do this I would have to write my own Seems similar in principle to the | 00:34:08 |
Matt Sturgeon | * Thanks, those links are insightful! 158594 sounds like exactly what I want:
But it looks like the latest comment is backtracking or downscaling that idea... Playing around in the repl, I can get I guess to do this I would have to write my own Seems similar in principle to the | 00:34:48 |
Matt Sturgeon |
Or maybe this wouldn't work, if | 00:43:33 |
Matt Sturgeon | Seems it is: Would a PR be welcome to have | 01:20:44 |
Matt Sturgeon | Or maybe returning both config and definedConfig , the latter having filtered out declared options that aren't defined | 01:30:41 |
purepani joined the room. | 04:11:12 | |
31 Jul 2024 | ||
infinisil | @mattsturg:matrix.org Immediate thoughts are that it might be a bit of a leaky abstraction, but maybe also not. Feel free to make a PR, but I can't promise to get to review it myself soon, but perhaps @roberthensing:matrix.org can :) | 09:53:38 |
1 Aug 2024 | ||
cleverca22 joined the room. | 12:53:32 | |
4 Aug 2024 | ||
Traxys joined the room. | 13:40:51 | |
tacticaltaco joined the room. | 22:09:55 | |
9 Aug 2024 | ||
Matt Sturgeon | I've been playing around with this in this branch (current commit), but what I have now is infinitely recursive, because Is this approach fundamentally flawed? Do you have any suggestions for working around the inf-recursion? The immediate alternative that springs to mind is to pass both a I | 13:30:14 |
Matt Sturgeon | * I've been playing around with this in this branch (current commit), but what I have now is infinitely recursive, because Is this approach fundamentally flawed? Do you have any suggestions for working around the inf-recursion? The immediate alternative that springs to mind is to pass both a I | 13:30:54 |
Matt Sturgeon | * I've been playing around with this in this branch (current commit), but what I have now is infinitely recursive, because Is this approach fundamentally flawed? Do you have any suggestions for working around the inf-recursion? The immediate alternative that springs to mind is to pass both a
| 13:31:39 |
Matt Sturgeon | * infinisil Robert Hensing (roberth) Thanks for your support so far! I've been playing around with the concept in this branch (current commit), but my current implementation is infinitely recursive, because Is this approach fundamentally flawed? Do you have any suggestions for working around the inf-recursion? The immediate alternative that springs to mind is to pass both a
| 15:12:07 |
10 Aug 2024 | ||
Matt Sturgeon | I've opened a draft PR that does it as an https://github.com/NixOS/nixpkgs/pull/333799 | 23:30:29 |
13 Aug 2024 | ||
Austin Horstman joined the room. | 22:45:20 | |
14 Aug 2024 | ||
Robert Hensing (roberth) | Matt Sturgeon: would you (or anyone I guess?) be interested in completing types.record from https://github.com/NixOS/nixpkgs/pull/257511? I don't have much time for this kind of thing due to other responsibilities recently | 14:41:16 |
Matt Sturgeon | I also don't know how much time I can dedicate to it. I had looked at it before when exploring solutions to https://matrix.to/#/!wfudwzqQUiJYJnqfSY:nixos.org/$mVuETvj4dPJNF6ZUdVEVvWmp07L5G3X-6y0bk-NmCP4?via=nixos.org&via=matrix.org&via=nixos.dev, however I came to the conclusion it is an interesting (and useful looking) type, but not a viable solution to the problem we have in nixvim. I'll attempt to clarify a little in my response to your (very helpful) feedback in #333799. | 14:45:44 |
Robert Hensing (roberth) | ohh saw the OP but glossed over the matrix thread - well good to have the context in github as well I guess | 14:50:44 |
Matt Sturgeon | Don't blame you, it ended up being a long thread (as usual!) | 14:51:11 |
Matt Sturgeon | Thanks again Robert Hensing (roberth) for your feedback and for reminding me of your existing proposals! I've posted my initial thoughts on github. And further; Reading through your simple/minimal module eval proposal, I think that's a great solution provided defining config from outside the simple-module type looks the same as defining config for a submodule type; i.e. many of the features you mention arent supported ( Enforcing one module/option per attr level (i.e. no nested options) sounds like a reasonable simplification too. My main concern is that "perfection" here may be acting as the enemy of "good"; i.e. your proposal is great, but will be much more effort to actually get merged into nixpkgs. From a different perspective, there's also some simplicity in not reinventing the wheel here, just to support one small feature ( | 15:19:50 |
Matt Sturgeon | Hm, I'm not sure why I was under the impression that the If we can define nested | 15:29:31 |
Matt Sturgeon | * Hm, I'm not sure why I was under the impression that the If we can define nested | 15:30:22 |
Robert Hensing (roberth) | Yeah records can have any type in their fields, including other records. It's simpler, lazier and more efficient that way. | 16:28:23 |
nbp | I have no time this week, I might give it a look next week if needed. | 16:39:28 |
Matt Sturgeon | I'll play around with adding optionalFields to types.record , won't have anything "finished" today though. I believe after that it's just adding docs and getting reviews? | 16:42:06 |