-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: migrate trivial files to doc-comment format #299986
Conversation
Reading through the types.nix file. I just notice how bad the module system types are documented. This could be something very impactful to document! |
it looks as though this is just a string replacement of remember, documentation that is only relevant to nixpkgs contributors does not belong in the manual. and commented out code defiantly does not belong in the manual. |
Oops. Right you are talking about This PR belongs to this one: #262987 there it is obvious that it is not just a string replacement. |
79c81f0
to
823e98a
Compare
doc comments can be useful, but i would also like to note a few things:
i think the best approach is to have doc comments be supplemental to the existing nix manual, instead of replacing it. additionally, you seem to have turned a few file-header comments into doc comments, and it's not clear how or if these should be rendered into the manual (probably not, since they mostly explain implementation details) |
👍 Noted.
We have the tools to render them in the manual currently. see e.g.: This stems from the "file header" of For 2. see my (draft) PR: nix-community/nixdoc#114 Yes, markdown has bad support when being inlined but i feel like this is something we have to deal with. Since rfc74 all nix documentation is markdown. And since rfc145 all doc-comments are markdown. We still need to decide which comments are doc-comments which is the fair point you got here.
Doc-comments explain individual functions or attributes or pieces of code that are user facing APIs. They are not meant to explain the whole library or abstract concepts. If that is missing then we need to write it. And this might not be something a doc-comment can do for you. |
It would be great to move the doc source into doc comments! |
Right didn't look there. I'll try to move the stuff in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple adjustments needed imo, but feel free to consider it approved after they're dealt with.
Thanks @DanielSidhion Co-authored-by: Daniel Sidhion <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reviewed during the docs team meeting)
Looking good!
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-04-04-documentation-team-meeting-notes-117/42754/1 |
Description of changes
Some files in /lib are trivial to migrate to doc-comments. Those are included here.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.