clarify rename error messages
This commit is contained in:
parent
77451661d4
commit
e1b206b4a9
@ -12,18 +12,20 @@ let
|
|||||||
visible = true;
|
visible = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# warn option was renamed
|
||||||
obsolete = from: to: rename {
|
obsolete = from: to: rename {
|
||||||
inherit from to;
|
inherit from to;
|
||||||
name = "Obsolete name";
|
name = "Obsolete name";
|
||||||
use = x: builtins.trace "Obsolete option `${showOption from}' is used instead of `${showOption to}'." x;
|
use = x: builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'." x;
|
||||||
define = x: builtins.trace "Obsolete option `${showOption from}' is defined instead of `${showOption to}'." x;
|
define = x: builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'." x;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# abort if deprecated option is used
|
||||||
deprecated = from: to: rename {
|
deprecated = from: to: rename {
|
||||||
inherit from to;
|
inherit from to;
|
||||||
name = "Deprecated name";
|
name = "Deprecated name";
|
||||||
use = x: abort "Deprecated option `${showOption from}' is used instead of `${showOption to}'.";
|
use = x: abort "Deprecated option `${showOption from}' is used. It was renamed to `${showOption to}'.";
|
||||||
define = x: abort "Deprecated option `${showOption from}' is defined instead of `${showOption to}'.";
|
define = x: abort "Deprecated option `${showOption from}' is used. It was renamed to `${showOption to}'.";
|
||||||
};
|
};
|
||||||
|
|
||||||
showOption = concatStringsSep ".";
|
showOption = concatStringsSep ".";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user