summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/project/package.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/project/package.lua b/xmake/core/project/package.lua
index 6c9155daf..18bd7bea6 100644
--- a/xmake/core/project/package.lua
+++ b/xmake/core/project/package.lua
@@ -197,6 +197,12 @@ function _instance:rules()
for rulename, ruleinfo in pairs(ruleinfos) do
rulename = "@" .. self:name() .. "/" .. rulename
local instance = rule.new(rulename, ruleinfo, {package = self})
+ if instance:script("load") then
+ utils.warning("we cannot add `on_load()` in package rule(%s), please use `on_config()` instead of it!", rulename)
+ end
+ if instance:script("load_after") then
+ utils.warning("we cannot add `after_load()` in package rule(%s), please use `on_config()` instead of it!", rulename)
+ end
rules[rulename] = instance
end
self._RULES = rules