| 17 Dec 2024 |
getchoo | And seriously, thanks for linking that deprecations file. If I ever need to do this more, I'll totally have to borrow some stuff from there 👍️ | 02:03:28 |
Matt Sturgeon | I really don't recommend using tryEval in this way... It was very situational in nixvim, and even then still probably wasn't the best solution. As you've pointed out, it has plenty of downsides.
I would recommend trying to find the option by recursively walking the "option attr path" (aka loc), checking each attr for lib.isOption and if true, continuing with opt.type.getSubOptions opt.loc.
getOptionRecursive was the part of the file I was hoping you would take inspiration from 😅
Once you have the actual (sub)option you can make use of opt.isDefined with no hacks needed.
| 09:49:16 |
| 20 Dec 2024 |
| 🐰 xiaoxiangmoe joined the room. | 13:59:03 |
| 21 Dec 2024 |
| stablejoy left the room. | 05:08:18 |
| sleepymonad joined the room. | 21:16:14 |
| ·☽•Nameless☆•777 · ± changed their profile picture. | 21:37:38 |
| sleepymonad set a profile picture. | 21:56:33 |
| 22 Dec 2024 |
| allrealmsoflife joined the room. | 20:27:50 |
| 26 Dec 2024 |
| Lorenz Leutgeb changed their display name from Lorenz Leutgeb to Lorenz Leutgeb (📞6343). | 19:33:43 |
| Lorenz Leutgeb changed their display name from Lorenz Leutgeb (📞6343) to Lorenz Leutgeb 📞6343. | 19:36:58 |
| 27 Dec 2024 |
| kdn changed their display name from nazarewk to kdn. | 12:38:41 |
| 31 Dec 2024 |
| getchoo changed their profile picture. | 12:38:57 |
| 1 Jan 2025 |
| NixOS Moderation Botchanged room power levels. | 14:26:09 |
| jopejoe1 (4094@39c3) changed their display name from jopejoe1 [4094] to jopejoe1. | 23:30:10 |
| 3 Jan 2025 |
ibizaman | Following up on my message about contracts from a while ago, I finally had the motivation and time to create a pre-RFC about it :) https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257 | 23:19:16 |
ibizaman | * Following up on my message about contracts from a little while ago, I finally had the motivation and time to create a pre-RFC about it :) https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257 | 23:19:47 |
| 6 Jan 2025 |
nbp | Thank you, while I have some objections about some of the details, I do appreciate a lot the effort in making this possible. I tried to provide a short explanations of my concerns on discord. | 11:58:49 |
nbp | * Thank you, while I have some objections about some of the details, I do appreciate a lot the effort in making this possible. I tried to provide a short explanations of my concerns on discourse. | 11:59:20 |
| 11 Jan 2025 |
| Orzklv left the room. | 04:07:52 |
| ·☽•Nameless☆•777 · ± changed their profile picture. | 04:42:56 |
| pandapip1 joined the room. | 21:20:48 |
| 15 Jan 2025 |
| SomeoneSerge (UTC+3) changed their display name from SomeoneSerge (utc+3) to SomeoneSerge. | 19:01:46 |
Matt Sturgeon | I was just writing some assertions, and wanted to show the option defs for an attr-of an option, isolated using lib.modules.mergeAttrDefinitionsWithPrio.
However, mergeAttrDefinitionsWithPrio only includes the value and highestPrio, with no access to files, definitions, definitionsWithLocations, etc.
I came up with a proof of concept that seems to mostly work, however it's failing nix-build lib/tests/release.nix so is probably not lazy enough?
My question: is there an intended way to print definitions/locations for an attr-of-an-option and, if not, how could I improve my patch to make it PR-ready? Or is there an alternative approach I could take?
In this specific scenario, I'm wanting to showDefs a _module.args.* attr, but the concept could apply to any attrsOf or lazyAttrsOf option.
| 21:37:21 |
| 17 Jan 2025 |
| chintuchamar joined the room. | 04:39:17 |
| 27 Jan 2025 |
| Brisingr joined the room. | 02:49:44 |
| 30 Jan 2025 |
| sarcasticadmin changed their display name from sarcasticadmin to Rob - KM6LBU. | 03:01:40 |
| sarcasticadmin changed their display name from Rob - KM6LBU to sarcasticadmin. | 03:02:55 |
| laurynasp joined the room. | 08:55:51 |
| 31 Jan 2025 |
| cafkafk 🏳️⚧️ changed their profile picture. | 05:06:12 |
| SomeoneSerge (UTC+3) changed their display name from SomeoneSerge to SomeoneSerge (Bruxelles). | 19:35:24 |