lib/modules: Prefix mkRemovedOptionModule & co. check names
To avoid name clashes Co-authored-by: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
767d80099c
commit
a6a70d14a9
|
@ -888,7 +888,7 @@ rec {
|
||||||
});
|
});
|
||||||
config._module.checks =
|
config._module.checks =
|
||||||
let opt = getAttrFromPath optionName options; in {
|
let opt = getAttrFromPath optionName options; in {
|
||||||
${showOption optionName} = lib.mkIf opt.isDefined {
|
${"removed-" + showOption optionName} = lib.mkIf opt.isDefined {
|
||||||
message = ''
|
message = ''
|
||||||
The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
|
The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
|
||||||
${replacementInstructions}
|
${replacementInstructions}
|
||||||
|
@ -960,7 +960,7 @@ rec {
|
||||||
let val = getAttrFromPath f config;
|
let val = getAttrFromPath f config;
|
||||||
opt = getAttrFromPath f options;
|
opt = getAttrFromPath f options;
|
||||||
in {
|
in {
|
||||||
${showOption f} = lib.mkIf (val != "_mkMergedOptionModule") {
|
${"merged" + showOption f} = lib.mkIf (val != "_mkMergedOptionModule") {
|
||||||
type = "warning";
|
type = "warning";
|
||||||
message = "The option `${showOption f}' defined in ${showFiles opt.files} has been changed to `${showOption to}' that has a different type. Please read `${showOption to}' documentation and update your configuration accordingly.";
|
message = "The option `${showOption f}' defined in ${showFiles opt.files} has been changed to `${showOption to}' that has a different type. Please read `${showOption to}' documentation and update your configuration accordingly.";
|
||||||
};
|
};
|
||||||
|
@ -1025,7 +1025,7 @@ rec {
|
||||||
});
|
});
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
{
|
{
|
||||||
_module.checks.${showOption from} = mkIf (warn && fromOpt.isDefined) {
|
_module.checks.${"renamed-" + showOption from} = mkIf (warn && fromOpt.isDefined) {
|
||||||
type = "warning";
|
type = "warning";
|
||||||
message = "The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.";
|
message = "The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue