# HG changeset patch # User Kim Alvefur # Date 1514331777 -3600 # Node ID 91f6815de26a7abe72c82032db6acaa2e59b5490 # Parent c50101b527bfcee0505b583482837b44185c0b46 moduleapi: Warn if a module being loaded as a dependency has been disabled diff -r c50101b527bf -r 91f6815de26a core/moduleapi.lua --- 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