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

srcOnly: remove the ellipsis #80903

Merged
merged 1 commit into from Feb 24, 2020
Merged

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Feb 23, 2020

The function doesn't make use of the extra arguments.

Motivation for this change

It makes it harder to spot typos when the arguments are just /dev/nulled

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.

The function doesn't make use of the extra arguments.
@zimbatm zimbatm merged commit b32a057 into NixOS:master Feb 24, 2020
@zimbatm zimbatm deleted the srcOnly-no-ellipsis branch February 24, 2020 23:12
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Feb 25, 2020
The function doesn't make use of the extra arguments.

(cherry picked from commit b32a057)
@edef1c
Copy link
Member

edef1c commented Apr 21, 2020

This completely breaks srcOnly — the extra args are meant to be ignored:

nix-repl> srcOnly guile
error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

nix-repl> srcOnly hello
error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

edef1c added a commit that referenced this pull request Apr 21, 2020
This reverts commit b32a057,
which breaks even the most straightforward uses of srcOnly:

    nix-repl> srcOnly guile
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

    nix-repl> srcOnly hello
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

Link: #80903 (comment)
@zimbatm
Copy link
Member Author

zimbatm commented Apr 21, 2020

Sorry about the breakage. Are you going to push the revert?

Some extra usage example would be nice to avoid future confusion (and also me not merging things without a proper review).

@edef1c
Copy link
Member

edef1c commented Apr 21, 2020

Sorry about the breakage. Are you going to push the revert?

I'll count this as approval — PR merged ^_^

Some extra usage example would be nice to avoid future confusion

I might write some up later, but I'm not quite sure where docs for this should go.

@zimbatm zimbatm mentioned this pull request Apr 22, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants