summaryrefslogtreecommitdiff
path: root/xmake/core/project/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-10-08 18:22:31 +0800
committerruki <[email protected]>2022-10-08 18:22:31 +0800
commit5bad2ec0a57cf58fc7ead66de9cd4e68a322875c (patch)
tree1cab175b95989c3697633299558456a5431be65f /xmake/core/project/package.lua
parent9de38bc4d90718d6430e1126a80de3c9ad21f253 (diff)
add some warings
Diffstat (limited to 'xmake/core/project/package.lua')
-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