Skip to content

Comments

doc: Cross-reference roles syntax doc & implementation#374035

Merged
FliegendeWurst merged 1 commit intoNixOS:masterfrom
Zocker1999NET:ext-nixos-doc-roles-refs
Mar 19, 2025
Merged

doc: Cross-reference roles syntax doc & implementation#374035
FliegendeWurst merged 1 commit intoNixOS:masterfrom
Zocker1999NET:ext-nixos-doc-roles-refs

Conversation

@Zocker1999NET
Copy link
Contributor

reasoning:

  • (doc -> code) make it easier to find where those are implemented
    • to get easier insight if/what a specific renderer does with it
    • in case one wants to improve them, which seems likely as they are rather Nix/NixOS-specific
    • (took me too long to find their implementation)
  • (code -> doc) ensure changes to the code can be reflected in the doc
    • code authors might not know about the reference documentation or how to find it

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

reasoning:
- (doc -> code) make it easier to find where those are implemented
  - to get easier insight if/what a specific renderer does with it
  - in case one wants to improve them, which seems likely
    as they are rather Nix/NixOS-specific
  - (took me too long to find their implementation)
- (code -> doc) ensure changes to the code can be reflected in the doc
  - code authors might not know about the reference documentation
    or how to find it
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 6.topic: policy discussion Discuss policies to work in and around Nixpkgs labels Jan 15, 2025
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jan 15, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 15, 2025
@Zocker1999NET
Copy link
Contributor Author

If someone of you knows more about this (non-blocking): This line of the AsciiDoc renderer looks like a wildcard for some roles: https://github.com/Zocker1999NET/nixpkgs/blob/3c20746f99537b0c8bf42ceef162fe73cdef7c77/pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/asciidoc.py#L190

But I have not found if this is there to use AsciiDoc native roles (& where those are documented) or if there is some CSS file or so where those are handled. In case this is not native, I think referencing docs/README.md from there as well would be useful too.

Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, at least not wrong - I'm not an expert on this code.

Not exactly sure, but the long term correct way to do this may be some sort of auto generation of docs, but that would likely require tearing apart all of the code.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Feb 1, 2025
@FliegendeWurst FliegendeWurst merged commit 3751870 into NixOS:master Mar 19, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants