@hsjobeki what youâre working on with RFC 145 and all its implications is a very big, heroic endeavor, and I have a lot of respect for that. So the following is my way of trying to be constructive.
Ideally that would be the case, but in practice I donât find that to be true: Things that are not documented (or badly documented, or hard to find) effectively donât exist for all but the few brave souls that dig into the source code. Conversely, things being simply put side by side can leave an impression they are somehow equivalent and it doesnât matter what you do with them. We can use these signals to our advantage and nudge people to do things that make their lives and our long-term maintenance easier.
In any case, we probably only disagree on superficial aspects. Letâs set them aside until more of your work materialises upstream.
The âNix ecosystemâ is not well-defined, and my gut feel is that itâs futile to pretend it is or to try forcing it.
I deem it more fruitful to instead strengthen separation of concerns, because it promises to
- Make it easier for new users to understand the system (i.e. build a correct mental model of it) and hence use it more effectively, in a smaller amount of time
- Make maintenance more tractable. When problems and their solution mechanisms are not tightly scoped, we tend to get into system-wide architectural debates that cost time but donât turn out concrete improvements.
tl;dr: Please go wild on the Nixpkgs manual
I donât feel like I have any authority over the Nixpkgs manual, as I barely work on it and donât know it very well, so my opinions on that subject are not well-informed and largely a matter of taste. If I were maintaining it, I wouldnât want to duplicate documentation thatâs in the responsibility of Nix maintainers; itâs a source of more work and confusion for users. Noting which library functions are aliases to builtins (or could be, since theyâre often conditional on the Nix version) would be really helpful @iFreilicht, but not a concern for this rendering feature - that just has to be written into each functionâs docs.
But again, Iâm not the one to tell anyone what to do. Feel free to propose changes as you see fit and get buy-in from whoever maintains that code!
However I do maintain nix.dev and the Nix manual, and here I have a clear vision:
-
In nix.dev donât lump together things that live in different components.
The goal is to communicate very clearly the distinction between each of the major ecosystem components, primarily to ease onboarding and help people decide what to focus on and where to go when they want to learn more.
Also nix.dev should mostly serve as guidance, i.e. be a thin wrapper around actual documentation. Anything else simply doesnât scale. We the documentation team, and I personally, are already constantly being drawn into more responsibilities. If we donât set boundaries we wonât finish anything and wonât be able to help anyone.
Therefore Iâd say: No, put function documentation in the reference manual for the component where they are defined. Weâll gladly provide pointers to that from nix.dev.
around
-
In the Nix manual make sure that Nix, its constituent parts, and their maturity and support status are represented correctly. It should be the single source of truth on everything that is specific to Nix.
Therefore Iâd frown upon builtins
documentation being worked on somewhere downstream. Please just make PRs to Nix. I know itâs not fun or easy most of the time, but itâs getting better literally by the day.
Somewhat related: We wonât get far with the RFC 145 doc comments syntax for builtins, as those are implemented in C++. Weâre lacking the infrastructure to produce automated builtins
interface documentation, and Iâd appreciate help in that area a lot.
This is always an option and youâre free to put effort into whatever you like.
tl;dr: I still recommend incremental changes to upstream instead
I donât think more new kinds of anything is beneficial to the broader ecosystem though, because:
- The bigger the new kind of thing grows,
- the larger the diff to upstream,
- the more upstream appears to be deficient or unmaintained,
- the more (especially new) users perceive the ecosystem to be an uncoordinated mess,
- the less likely any of that ever gets fixed.
Iâve seen so many examples of that in the past that I lost track. All of them ran out of steam eventually, leaving the ecosystem in a state I consider worse than before: with more half-finished ideas scattered all over the place.
Upstream is the only thing that will survive all other efforts and still have the largest impact because thatâs what new people start out with and take for granted. Yes, itâs operating under constraints that everyone I know rightfully considers very annoying at best, with many hard-to-predict barriers to contribution. But thatâs the commons. I have no better answers than âmake smaller changes, theyâre easier to produce and to acceptâ. Letâs fix things step by step.
I fully agree on the first part, assuming weâre still talking about the Nixpkgs manual. I donât think there is all that much effort being put into improvements (especially in comparison to other things being worked on), but the effort needed to get it into a shape Iâd like would indeed be substantial.
But why not instead help to make it stop sucking? Itâs mostly not fun, itâs not short-term rewarding, but this is where small changes will help immediately and add up over time. Itâs a process that will quite predictably lead to good results, if ever so slowly.
Up to recently it wasnât even easy to find what could be done concretely, but for a few months now we at least have a first stab at an overview.
I donât know anyone who invests major time into the Nixpkgs manual. (Which doesnât necessarily mean much, but I should know, right?) Doing things in parallel until theyâre better than the original and can be used as a drop-in replacement is exactly the kind of far-reaching change that I donât expect to come to fruition within a time span Iâm comfortable planning for.
To get back to constructive feedback on what youâre trying to achieve: Youâre tackling a real, far-reaching problem and I think youâre doing great. Expect the process to take a Long Time⢠to come to conclusion. Showing a proof of concept is excellent. Donât get discouraged if people donât agree with todayâs version of your vision. Thatâs too much to ask and youâll need buy-in for the whole package to get it in. Again, making the package smaller will make it more likely.
Therefore I really recommend you to focus on getting incremental changes merged into Nixpkgs that donât depend on the big outcomes such as the RFC to land or the Nix language evaluator to implement it. That will help you build up mindshare and increase the bus factor youâll need to get the big chunks of upstream work that are still to come merged. Find your people, donât rely on me or anyone already entrenched in something to approve or help in substantial ways. As @zimbatm implies, that would only slow down both sides.
Iâd love to see you taking ownership of library documentation in Nixpkgs, and ideally share it with a few others. Where you really need approval for some reason: I definitely prefer changes the full extent and consequences of which I can gasp in a few minutes, and likely this is true for many others who are busy enough with their own area of responsibility.