From 9dead5565a9ce7e25d9dfb7230b885bdaf634177 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 14 Jun 2022 17:25:06 +0200 Subject: [PATCH] lib/types, lib/modules: Remove unused extensionOffset --- lib/modules.nix | 8 +------- lib/types.nix | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 48ddb31508f2..d8ae497fb2d8 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -113,10 +113,6 @@ rec { args ? {} , # This would be remove in the future, Prefer _module.check option instead. check ? true - # Internal variable to avoid `_key` collisions regardless - # of `extendModules`. Used in `submoduleWith`. - # Test case: lib/tests/modules, "168767" - , extensionOffset ? 0 }: let withWarnings = x: @@ -345,17 +341,15 @@ rec { modules ? [], specialArgs ? {}, prefix ? [], - extensionOffset ? length modules, }: evalModules (evalModulesArgs // { modules = regularModules ++ modules; specialArgs = evalModulesArgs.specialArgs or {} // specialArgs; prefix = extendArgs.prefix or evalModulesArgs.prefix or []; - inherit extensionOffset; }); type = lib.types.submoduleWith { - inherit modules specialArgs extensionOffset; + inherit modules specialArgs; }; result = withWarnings { diff --git a/lib/types.nix b/lib/types.nix index 4af75a3d6423..caaa6dccc6d4 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -571,11 +571,6 @@ rec { , specialArgs ? {} , shorthandOnlyDefinesConfig ? false , description ? null - - # Internal variable to avoid `_key` collisions regardless - # of `extendModules`. Wired through by `evalModules`. - # Test case: lib/tests/modules, "168767" - , extensionOffset ? 0 }@attrs: let inherit (lib.modules) evalModules; @@ -623,7 +618,6 @@ rec { (base.extendModules { modules = [ { _module.args.name = last loc; } ] ++ allModules defs; prefix = loc; - extensionOffset = extensionOffset + length defs; }).config; emptyValue = { value = {}; }; getSubOptions = prefix: (base.extendModules