-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
lib.options.mkPackageOption: use lib.showAttrPath #398066
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.options.mkPackageOption: use lib.showAttrPath #398066
Conversation
|
The new behavior looks good to me. Could you add a test case for this new requirement? |
Sure, I can do that later. OTTOYH do you know where tests for |
|
Probably |
5a81405 to
8c47f93
Compare
|
Thanks. I've amended the commit to add tests for the I also noticed several test cases were declared in One other theoretical edge-case I noticed is when I don't necessarily want to address that in this PR, and we don't seem to have a In such cases, users can manually specify |
There were several test case options declared in `declare-mkPackageOption.nix` that were not actually tested in `modules.sh`.
Make use of `lib.showAttrPath` instead of manually doing `concatStringsSep "."`. This means edge-cases such as the attr-path including names that are not valid nix identifiers will be handled better. See: - https://nix.dev/manual/nix/2.26/language/identifiers - https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.attrsets.showAttrPath
8c47f93 to
6107d48
Compare
|
@roberth are you able to review now that tests have been added? |
hsjobeki
left a comment
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.
Looking lgtm to me. Since only the tests where missing @roberth, im merging this one.
Make use of
lib.showAttrPathinstead of manually doingconcatStringsSep ".".This means edge-cases like
.being included in an attr-name will be handled better.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-build lib/tests/release.nixnix-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.