diff options
| author | ruki <[email protected]> | 2021-05-12 00:41:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-12 00:41:31 +0800 |
| commit | 2879af92ceae099910fe0ea5827c6bb708c5c2fc (patch) | |
| tree | bfb1612f8c6a716bb8e31d8a0b107ed2473daaf0 | |
| parent | 4e67226f86e1949d1087893cd8fe218535d91ba9 (diff) | |
isolate package jobs
| -rw-r--r-- | xmake/actions/build/build.lua | 2 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 14 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/check.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/install_packages.lua | 7 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 1 |
5 files changed, 7 insertions, 19 deletions
diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua index 692489f33..0fc15fd81 100644 --- a/xmake/actions/build/build.lua +++ b/xmake/actions/build/build.lua @@ -222,7 +222,7 @@ function main(targetname) if errors and progress.showing_without_scroll() then print("") end - end, curdir = curdir, count_as_index = true, isolate = true}) + end, curdir = curdir, count_as_index = true}) os.cd(curdir) end end diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index bff650f5d..d8ab9da84 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -1002,7 +1002,6 @@ end function os.getenvs() local envs = os._CURENVS if not envs then - print("os.getenvs") envs = {} for _, line in ipairs(os._getenvs()) do local p = line:find('=', 1, true) @@ -1051,18 +1050,6 @@ function os.setenvs(envs) return oldenvs end -os._setenv2 = os._setenv -os._setenv = function (name, value) - print("setenv", name, value) - return os._setenv2(name, value) -end - -os._getenv = os.getenv -os.getenv = function (name) - print("getenv", name) - return os._getenv(name) -end - -- add environment variables -- e.g. envs["PATH"] = "/xxx:/yyy/foo" function os.addenvs(envs) @@ -1072,7 +1059,6 @@ function os.addenvs(envs) for name, values in pairs(envs) do local ok local oldenv = oldenvs[name] - print("oldenv", name, oldenv) if oldenv == "" or oldenv == nil then ok = os._setenv(name, values) elseif not oldenv:startswith(values) then diff --git a/xmake/modules/private/action/require/check.lua b/xmake/modules/private/action/require/check.lua index 9b20b1310..6b37eeb8b 100644 --- a/xmake/modules/private/action/require/check.lua +++ b/xmake/modules/private/action/require/check.lua @@ -48,7 +48,7 @@ function main(requires_raw) instance:fetch() os.setenvs(oldenvs) end - end, {total = #packages}) + end, {total = #packages, isolate = true}) -- register all required root packages to local cache register_packages(packages) diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index 2b482b0e9..0adea1fc9 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -238,7 +238,10 @@ function _install_packages(packages_install, packages_download, installdeps) packages_installing[index] = nil packages_downloading[index] = nil - end, {total = #packages_install, comax = (option.get("verbose") or option.get("diagnosis")) and 1 or 4, on_timer = function (running_jobs_indices) + end, {total = #packages_install, + comax = (option.get("verbose") or option.get("diagnosis")) and 1 or 4, + isolate = true, + on_timer = function (running_jobs_indices) -- do not print progress info if be verbose if option.get("verbose") or not show_wait then @@ -385,7 +388,7 @@ function main(requires, opt) instance:fetch() os.setenvs(oldenvs) end - end, {total = #packages}) + end, {total = #packages, isolate = true}) -- register all required root packages to local cache register_packages(packages) diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 8b29a83d7..598acd251 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -22,7 +22,6 @@ import("core.base.semver") import("core.base.option") import("core.base.global") -import("private.async.runjobs") import("private.utils.progress") import("core.cache.memcache") import("core.project.project") |
