Nix Documentation | 439 Members | |
| Discussion about documentation improvements around the Nix ecosystem | 93 Servers |
| Sender | Message | Time |
|---|---|---|
| 28 Jun 2023 | ||
| until then walking the ast with minimal awareness of nix semantics is our best bet | 21:23:47 | |
In reply to @sternenseemann:systemli.orgas for that: the extension list in the manual is not entirely complete. there are a few more we haven't documented yet (most or even all of which predate the markdown tooling itself) | 21:26:54 | |
In reply to @sternenseemann:systemli.orgas for that: the extension list in the manual is not entirely complete. there are a few more we haven't documented yet (most or even all of which predate the markdown tooling itself) | 21:27:24 | |
| Dynamically determining docs has a lot of problems: What constitutes the doc comment? The comment at the let binding? At the inherit exposing it? What happens if I pass the value through the identity function? etc. pp. This is because we don't have a sense of an exported symbol. Consequently we need to establish some sort of convention here that can be transferable to static doc generation since every file has to be a full Nix expression. When dynamically gathering documentation you don't suddenly have no issues: You need to know about the library's structure, e.g. which of the exposed functions are aliases? which functions are deprecated? Since you can't know this. The whole story becomes a lot worse if you are not dealing with anything as tame as When statically doing docs, you need to have a convention, yes, and need to somehow be able to tell it how it relates to the “library” as a whole. This also requires special knowledge about the library, but so does the dynamic solution. This is my point: Both solutions suffer from variations of the same problem; and the problem is that we have no module system, so a library could be structured in arbitrary ways and it is impossible to figure out what's what independently of the concrete code. | 21:34:53 | |
An important argument against dynamicism for me is that it'd be okay for <nixpkgs/lib>, but as soon as you have anything in pkgs proper that's to be documented you'll suffer | 21:35:50 | |
* An important argument against dynamicism for me is that it'd be okay for <nixpkgs/lib>, but as soon as you have anything in pkgs proper that's to be documented you'll suffer. | 21:35:56 | |
| exactly, all of that. which is why we would need to develop very strong conventions for what is and isn't a doc comment, a documented item, etc before moving it into nix. whether it's ever moved is going to be up in the air regardless, and in the interim nixdoc-like solutions are kind of the only option anyway | 21:37:40 | |
| and they do work well enough with some outside input for categorization and namespacing | 21:38:09 | |
| if we converge on something that covers a sufficient number of cases we can start thinking about formalizing the rules applied at that point and putting them into nix, before that it's all just daydreams | 21:38:57 | |
| that's also true the RFC has a big risk in the sense that it'll make whatever it prescribes eternal | 22:19:30 | |
| codifying what is a doc comment and what isn't would be a welcome first step in any case, even if it ends there for a while. nixdoc has to hack around that not being well-defined quite a bit today to not pick up a lot of garbage as accidental doc comments :< | 22:21:16 | |
| but nixpkgs & nixdoc could also do that provisionally | 22:23:10 | |
| it's only a treewide commit away | 22:23:17 | |
| we've had our share of treewide commits breaking new truths tbh xD | 22:24:03 | |
| this is the way | 23:10:05 | |
| if you want to have a go, please do! :) | 23:18:52 | |
| hopefully nixdoc#40 makes it in soon so we can fully remove docbook from the nixpkgs manual, after that there's so much opportunity for improvement | 23:20:16 | |