Skip to content
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

lib/trivial: Move pipe note into pipe documentation. #105984

Closed
wants to merge 1 commit into from
Closed

lib/trivial: Move pipe note into pipe documentation. #105984

wants to merge 1 commit into from

Conversation

alunduil
Copy link
Contributor

@alunduil alunduil commented Dec 5, 2020

This one is a little weird. The note at the end of the pipe function is
being picked up by the documentation generator and being used as the
documentation for the concat function (see the 20.09 manual for a cross
reference). By moving this note into the documentation comment for
pipe, we solve two issues:

  1. the note being listed under concat where it doesn't belong
  2. the documentation for concat actually being exposed in the manual

If this isn't the desired solution we'll have to look into how
documentation is generated and see if there is a bug in that system
instead, but I like the clarity of this solution.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This one is a little weird.  The note at the end of the pipe function is
being picked up by the documentation generator and being used as the
documentation for the concat function (see the 20.09 manual for a cross
reference).  By moving this note into the documentation comment for
pipe, we solve two issues:

1. the note being listed under concat where it doesn't belong
2. the documentation for concat actually being exposed in the manual

If this isn't the desired solution we'll have to look into how
documentation is generated and see if there is a bug in that system
instead, but I like the clarity of this solution.
@jtojnar
Copy link
Contributor

jtojnar commented Dec 5, 2020

I think that is a bug in the documentation generator and that note is not intended to be exposed in the documentation – it is intended as a message for people who will edit the file in the future.

@alunduil
Copy link
Contributor Author

alunduil commented Dec 5, 2020

That makes sense. I didn't know which way to take it since the note is useful in the manual as well (in fact, I'm wondering if most of these shouldn't be collapsed by default in the manual since they don't seem to be used for more than a reference when and if they're needed but I can handle that later).

I'll see about setting up a new pull request that fixes the documentation generation to ensure it's only pulling comments that are attached to a function. Do you have any pointers on where to start looking into that?

@jtojnar
Copy link
Contributor

jtojnar commented Dec 5, 2020

IIRC it should be somewhere in https://github.com/tazjin/nixdoc

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@alunduil alunduil closed this Nov 7, 2022
@alunduil alunduil deleted the lib.trivial.concat branch November 7, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants