!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

230 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture51 Servers

Load older messages


SenderMessageTime
11 Jul 2023
@raitobezarius:matrix.orgraitobezarius
In reply to @nbp:mozilla.org
At the moment my head is not public. :P
:)
13:30:58
@profpatsch:augsburg.oneprofpatschpiegames: right now you can’t even get the dependency graph out of the module system afaik13:31:30
@profpatsch:augsburg.oneprofpatschor if it’s possible I haven’t seen it done13:31:37
@piegames:matrix.org@piegames:matrix.orgBecause instead of forcing the entire set of options to determine dependency cycles, you'd only have to do so on a more coarse per-module structure first, which is a lot less work. Then all the uninvolved modules could just be ignored13:31:40
@profpatsch:augsburg.oneprofpatschthere’s no real way of telling what exactly is needed in practice without extracting that13:31:56
@nbp:mozilla.orgnbp Profpatsch: Outputs already exists, this is the config, inputs do not, and I am really sad, because the only alternative I had was a crazy maintainer script which gives you a graphviz file after adding throw expression to every option. 13:32:33
@piegames:matrix.org@piegames:matrix.org
In reply to @profpatsch:augsburg.one
piegames: right now you can’t even get the dependency graph out of the module system afaik
I think it should be possible in theory to write a module system evaluator which extracts that data, but not sure to what purpose.
13:32:57
@nbp:mozilla.orgnbp Profpatsch: You can get a dependency graph, with this old maintainer script. 13:33:10
@nbp:mozilla.orgnbpMaybe it is still part of Nixpkgs, who know, I have not look in years.13:33:26
@piegames:matrix.org@piegames:matrix.orgInstead I suggest tucking on some dependency system onto the module system, and the evaluator now additionally checks that each module only references options which are declared as one of its dependencies. (That's the main part I did back then).13:33:39
@profpatsch:augsburg.oneprofpatschpiegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously13:33:41
@piegames:matrix.org@piegames:matrix.org
In reply to @profpatsch:augsburg.one
piegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously
I mean, you could always design something that works without, which I tried, and it was no fun. I don't remember the exact issues I was running into though
13:34:51
@nbp:mozilla.orgnbp Profpatsch: https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/option-usages.nix You are lucky, it still exists! 13:39:06
@piegames:matrix.org@piegames:matrix.org
In reply to @profpatsch:augsburg.one
piegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously
I think you probably won't need it for most modules, but you might need it for some of the more "core" bits. Which is basically my point: with a coarse dependency graph which tracks that information, one would not pay the performance penalty of recursion unless where required.
13:41:01
@infinisil:matrix.orginfinisil @room: The next meeting will take place in 30 minutes - meeting link - live stream - meeting notes 13:57:35
@profpatsch:augsburg.oneprofpatschpiegames: in that case maybe have a package abstraction that can merge multiple files, but not generically14:19:06
@profpatsch:augsburg.oneprofpatschI mean, ML has basically solved this problems with functors14:20:29
@profpatsch:augsburg.oneprofpatschWe could just follow suit14:20:34
@infinisil:matrix.orginfinisil tomberek: John Ericson: Joining? 14:33:09
@Ericson2314:matrix.orgJohn Ericsonsorry in a work meeting will be late :/14:33:25
@piegames:matrix.org@piegames:matrix.org"TODO: refactor once something like Profpatsch's types-simple will land" what's types-simple, and when will it land?15:52:55
@piegames:matrix.org@piegames:matrix.orgAh, found it: https://github.com/NixOS/nixpkgs/compare/master...Profpatsch:nixpkgs:types-simple-WIP15:54:21
@profpatsch:augsburg.oneprofpatschpiegames: notime, Eelco said he doesn’t want it16:08:40
@piegames:matrix.org@piegames:matrix.orgSomebody else would have to veto in order to stop me (:16:10:13
@piegames:matrix.org@piegames:matrix.orgI might be motivated to pick this up, unless somebody shows me another way to solve my problems described in https://discourse.nixos.org/t/the-module-system-is-dead-how-to-do-input-validation/30297/416:11:20
@profpatsch:augsburg.oneprofpatschpiegames: An alternative with a slightly different design is https://code.tvl.fyi/tree/nix/yants/default.nix16:11:44
@piegames:matrix.org@piegames:matrix.orgYeah I've seen YANTS and didn't like it as much16:12:07
@profpatsch:augsburg.oneprofpatschThe main difference is that types-simple is out-of-band, while yants is in-band16:12:11
@piegames:matrix.org@piegames:matrix.orgwdym16:12:30
@profpatsch:augsburg.oneprofpatschwhich gives yants the (partial) ability to type-check functions16:12:37

Show newer messages


Back to Room ListRoom Version: 9