From 93a7da63ce2be9f8125c8886c3f319d866d4e439 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 25 May 2016 13:07:58 +0800 Subject: get more verbose info for deprecated entries --- xmake/core/base/deprecated.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.3.1