diff options
| author | ruki <[email protected]> | 2019-02-03 12:20:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-02-03 12:20:55 +0800 |
| commit | 2c7a2ff446fd7ad85922a2990d6452627133c8c3 (patch) | |
| tree | e1502c769f9e1aa590e37b571d453a6123e9cc53 /xmake/core/base/deprecated.lua | |
| parent | e35595f73271cb14363c027694183dec3a32e910 (diff) | |
improve deprecated tips
Diffstat (limited to 'xmake/core/base/deprecated.lua')
| -rw-r--r-- | xmake/core/base/deprecated.lua | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/xmake/core/base/deprecated.lua b/xmake/core/base/deprecated.lua index 89702a89a..657d48f86 100644 --- a/xmake/core/base/deprecated.lua +++ b/xmake/core/base/deprecated.lua @@ -48,32 +48,26 @@ end -- dump all deprecated entries function deprecated.dump() - -- the entries - deprecated._ENTRIES = deprecated._ENTRIES or {} - - -- dump all + -- dump one or more .. local index = 0 + deprecated._ENTRIES = deprecated._ENTRIES or {} for old, new in pairs(deprecated._ENTRIES) do - -- trace newline + -- trace if index == 0 then print("") end - - -- trace if new then utils.cprint("${bright color.warning}deprecated: ${clear}please uses %s instead of %s", new, old) else utils.cprint("${bright color.warning}deprecated: ${clear}please remove %s", old) end - -- too much? - if index > 6 and not option.get("verbose") then + -- show more? + if not option.get("verbose") then utils.cprint("${bright color.warning}deprecated: ${clear}add -v for getting more ..") break end - - -- update index index = index + 1 end end |
