Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f9b2528866c3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2b1e2f2e975e
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 28, 2019

  1. lib.mkRemovedOptionModule: Show replacement for option usage too

    Previously mkRemovedOptionModule would only show the replacement
    instructions when the removed option was *defined*. With this change, it
    also does so when an option is *used*.
    
    This is essential for options that are only intended to be used such as
    `security.acme.directory`, whose replacement instructions would never
    trigger without this change because almost everybody only uses the
    option and isn't defining it.
    infinisil committed Sep 28, 2019
    Copy the full SHA
    ebb136d View commit details

Commits on Oct 2, 2019

  1. Merge pull request #69746 from Infinisil/rem-opt-usage-message

    lib.mkRemovedOptionModule: Show replacement for option usage too
    infinisil authored Oct 2, 2019
    Copy the full SHA
    2b1e2f2 View commit details
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/modules.nix
1 change: 1 addition & 0 deletions lib/modules.nix
Original file line number Diff line number Diff line change
@@ -591,6 +591,7 @@ rec {
{ options, ... }:
{ options = setAttrByPath optionName (mkOption {
visible = false;
apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}";
});
config.assertions =
let opt = getAttrFromPath optionName options; in [{