-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nix/tests: run test help.sh only if nix is built with documentation #11729
Conversation
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.
One thing, and then LGTM
package.nix
Outdated
] ++ lib.optionals enableManual [ | ||
man |
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.
Since this is for execution ("native") during the tests, it should stay in nativeBuildInputs
.
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.
Okay, done.
My rational was, that man is needed for displaying the man-page anyway so i did put it into BuildInputs as i thought it will be a runtime dependency. Or am i wrong about this? I mean this code:
Line 319 in 79bbb4a
void showManPage(const std::string & name) |
Or did i miss something?
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.
Adding it buildInputs doesn't make it a runtime dependency automatically. Using something like makeWrapper
does. But I am unsure if we want to make nix depending on man all the time... It's only used for interactive usage, but nix will be also downloaded in many other places i.e. in CI environments.
@roberth also why nativeBuildInputs
and not checkInputs
?
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.
Thanks for the clarification!
The help command will fail if man is disabled in the config then.
Should I add a wrapper or just leave it as it is and make this an issue for the future?
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.
No I wouldn't add a wrapper and keep it an optional run time dependency for now.
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.
why
nativeBuildInputs
and notcheckInputs
?
Because I haven't internalized this 2 year old parameter yet, but then it should be nativeInstallCheckInputs
. That's the most accurate role for this, and iiuc it would let us get rid of the lib.optionals doInstallCheck [
bit in nativeBuildInputs
.
Let's fix it in the old way first, and then we can refactor it more later without increasing the scope of this PR.
tests/functional/help.sh calls nix-* commands with option --help if nix is built without documentation the option --help throws an error because the man page it wants to display is missing
108d90d
to
85b0cd3
Compare
Thank you @emhamm |
Motivation
tests/functional/help.sh calls nix-* commands with option --help
if nix is built without documentation the option --help throws an error because the man page it wants to display is missing
Context
With disabled docs nix can not be built because of a failing test.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.