Allow actions to load their module implementations on-demand.

By only registering the action, we skip the processing that would been necessary to load and evaluate the module scripts. This will allow us to improve overall performance while also scaling up the number of supported actions. To force loading of the entire module (to override specific calls, for instance), call require().
This commit is contained in:
Jason Perkins 2015-03-07 13:12:11 -05:00
parent 025c434590
commit ad24e41dd6
3 changed files with 10 additions and 1 deletions

View File

@ -1 +1 @@
3935627f6ef6f848afd1ac3b22cc1eaa7b34a582 modules/xcode
e68bbf571323ec91c409ee86f057c2b380aa35d9 modules/xcode

View File

@ -85,4 +85,8 @@
"actions/clean/_clean.lua",
"_premake_init.lua",
-- Built-in action modules. The action is registered, but the actual
-- implementation is not loaded unless the action is used.
"modules/xcode/_action.lua",
}

View File

@ -197,6 +197,11 @@
if act then
_OS = act.os or _OS
end
-- Some are implemented in standalone modules
if act and act.module then
require(act.module)
end
end