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: Make overrideScope take arguments in the conventional order for 18.09 #47239

Closed

Conversation

Ericson2314
Copy link
Member

Motivation for this change

Backport of #47238.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@Ericson2314 Ericson2314 added this to the 18.09 milestone Sep 23, 2018
@Ericson2314 Ericson2314 changed the title lib: Make overrideScope take arguments in the conventional order lib: Make overrideScope take arguments in the conventional order for 18.09 Sep 23, 2018
That <varname>overrideScope</varname> now takes a function with parameters in the opposite order: <literal>self: super: { … }</literal> now whereas it was <literal>super: self: { … }</literal> before.
This brings makes it consistent with everything else related to <literal>super: self: { … }</literal> overrides, including even the other more common implementations of <varname>overrideScope</varname> used in the Haskell infrastructure and other language-specific infrastructures.
The most prominant uses of <varname>makeScope</varname> today include <varname>emacsPackagesNg</varname>, <varname>q5*</varname>, and most desktop enironments' package sets such as <varname>gnome3</varname>, KDE and <varname>plasma5</varname>, <varname>xfce4-13</varname>, and <varname>deepin</varname>.
If you use any of these package sets and experience problems, please check your local configuration for any overrides / overlays and make sure they are now in the conventional <literal>self: super: { … }</literal> form.
Copy link
Member

Choose a reason for hiding this comment

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

  1. some line-breaks would be nice
  2. this buries the most important user-facing change under quite a lot of technical bits that aren't relevant to the user trying to fix their system. Ideally we'd swap it: call out exactly who is impacted in the first few words, then how to fix it, then the technical why details.

@srhb
Copy link
Contributor

srhb commented Sep 23, 2018

Yeah, I think it's a good idea to fix the order here! Helps a lot with the docs, too. :)

See the doc changes for details. Since that implementation did not even
share any code either until I changed it recently in
3cf4354, this inconsistency is almost
certainly an oversight and not intentional. There's no way to make this
a smooth transition, sadly, but I hope in listing common uses in the
manual, people searching for fixes to their problems will easy find it.
@Ericson2314
Copy link
Member Author

Ericson2314 commented Sep 23, 2018

Closing until master PR #47238 is merged to not fracture discussion.

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

4 participants