diff options
| author | ruki <[email protected]> | 2016-05-25 13:07:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-25 13:07:58 +0800 |
| commit | 93a7da63ce2be9f8125c8886c3f319d866d4e439 (patch) | |
| tree | 8c01891442670d6a97175c74739a6f3575e1a0df | |
| parent | af0d4247f488cdec9f0ba0a05f484e8f9fcfa59b (diff) | |
get more verbose info for deprecated entries
| -rw-r--r-- | xmake/core/base/deprecated.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/base/deprecated.lua b/xmake/core/base/deprecated.lua index b676b0bfa..cb50c6fc6 100644 --- a/xmake/core/base/deprecated.lua +++ b/xmake/core/base/deprecated.lua @@ -27,6 +27,7 @@ local deprecated = deprecated or {} local utils = require("base/utils") local table = require("base/table") local string = require("base/string") +local option = require("base/option") -- add deprecated entry function deprecated.add(newformat, oldformat, ...) @@ -50,8 +51,20 @@ function deprecated.dump() -- dump all print("") + local index = 0 for old, new in pairs(deprecated._ENTRIES) do + + -- trace utils.printf("deprecated: please uses %s instead of %s", new, old) + + -- too much? + if index > 6 and not option.get("verbose") then + utils.printf("deprecated: add -v for getting more ..") + break + end + + -- update index + index = index + 1 end end |
