diff options
| author | ruki <[email protected]> | 2021-10-09 12:40:55 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-09 12:40:55 +0800 |
| commit | 8bedd250e10d821857adf671d2282ca3cdd6706d (patch) | |
| tree | 81ccb2e9e2ec42dcc12786b5880430405aa54748 | |
| parent | 1e77446b9d4b398af4d90cf5234f9d2201ac3987 (diff) | |
Update object.lua
| -rw-r--r-- | xmake/rules/go/build/object.lua | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/xmake/rules/go/build/object.lua b/xmake/rules/go/build/object.lua index cf6a1c9ff..e24620702 100644 --- a/xmake/rules/go/build/object.lua +++ b/xmake/rules/go/build/object.lua @@ -21,9 +21,9 @@ -- imports import("core.base.option") import("core.base.hashset") -import("core.theme.theme") import("core.tool.compiler") import("core.project.depend") +import("utils.progress") -- build the source files function main(target, sourcebatch, opt) @@ -31,9 +31,6 @@ function main(target, sourcebatch, opt) -- is verbose? local verbose = option.get("verbose") - -- get progress range - local progress = assert(opt.progress, "no progress!") - -- get source files and kind local sourcefiles = sourcebatch.sourcefiles local sourcekind = sourcebatch.sourcekind @@ -72,12 +69,7 @@ function main(target, sourcebatch, opt) -- trace progress info for index, sourcefile in ipairs(sourcefiles) do - local progress_prefix = "${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} " - if verbose then - cprint(progress_prefix .. "${dim color.build.object}compiling.$(mode) %s", progress, sourcefile) - else - cprint(progress_prefix .. "${color.build.object}compiling.$(mode) %s", progress, sourcefile) - end + progress.show(opt.progress, "${color.build.object}compiling.$(mode) %s", sourcefile) end -- trace verbose info |
