Diff

core/moduleapi.lua @ 8487:91f6815de26a

moduleapi: Warn if a module being loaded as a dependency has been disabled
author Kim Alvefur <zash@zash.se>
date Wed, 27 Dec 2017 00:42:57 +0100
parent 7982:e30b0cbed472
child 8533:66cdf5c7af85
line wrap: on
line diff
--- a/core/moduleapi.lua	Sat Dec 23 06:17:11 2017 +0100
+++ b/core/moduleapi.lua	Wed Dec 27 00:42:57 2017 +0100
@@ -161,6 +161,9 @@
 			end
 		end);
 	end
+	if self:get_option_inherited_set("modules_disabled", {}):contains(name) then
+		self:log("warn", "Loading prerequisite mod_%s despite it being disabled", name);
+	end
 	local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
 	if mod and mod.module.host == "*" and self.host ~= "*"
 	and modulemanager.module_has_method(mod, "add_host") then