summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-01 21:02:28 +0800
committerruki <[email protected]>2021-01-01 21:02:28 +0800
commite1e70e4d1867f92f5591e7dd068ca13819955ed4 (patch)
tree9c4ddbf7c91099b36def727dd578188fc53b4da4 /xmake/core/project/project.lua
parent99126a6271f7ed8a4712d5cd5c060210090b8d1c (diff)
add after_load to add_requires
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua13
1 files changed, 1 insertions, 12 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index db00493ea..6bb8d8b07 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -614,29 +614,18 @@ function project._load_requires()
-- load it from cache first (@note will discard scripts in extrainfo)
local instance = requireinfo.load(alias or packagename)
if not instance then
-
- -- init a require info instance
instance = table.inherit(requireinfo)
-
- -- save name and info
instance._NAME = alias or packagename
instance._INFO = { __requirestr = requirestr, __extrainfo = extrainfo }
end
- -- move scripts of extrainfo (e.g. on_load ..)
+ -- discard scripts in extrainfo, we need not it now (e.g. on_load ..)
if extrainfo then
for k, v in pairs(extrainfo) do
if type(v) == "function" then
- instance._SCRIPTS = instance._SCRIPTS or {}
- instance._SCRIPTS[k] = v
extrainfo[k] = nil
end
end
-
- -- TODO exists deprecated option? show tips
- if extrainfo.option then
- os.raise("`option = {}` is no longger supported in add_requires(), please update xmake.lua")
- end
end
-- add require info