summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorwtz <[email protected]>2023-07-19 12:35:52 +0800
committerwtz <[email protected]>2023-07-19 12:35:52 +0800
commitf75224a8435d0eb9cdda79f8bc571eeef25a8e33 (patch)
tree278e00b17c8f5558df1c1a21f1204078ea62a58f /xmake/modules
parentca83e9a78b7f2d45e833fa705c880867ad2381c6 (diff)
Fix grammar
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/project/depend.lua8
-rw-r--r--xmake/modules/core/tools/cl.lua8
-rw-r--r--xmake/modules/core/tools/gcc.lua12
-rw-r--r--xmake/modules/core/tools/ml.lua2
-rw-r--r--xmake/modules/core/tools/rc.lua2
-rw-r--r--xmake/modules/detect/sdks/find_qt.lua2
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua2
-rw-r--r--xmake/modules/detect/tools/armclang/has_flags.lua2
-rw-r--r--xmake/modules/detect/tools/cl/has_flags.lua2
-rw-r--r--xmake/modules/detect/tools/clang_cl/has_flags.lua2
-rw-r--r--xmake/modules/detect/tools/gcc/has_flags.lua2
-rw-r--r--xmake/modules/detect/tools/sdcc/has_flags.lua2
-rw-r--r--xmake/modules/lib/detect/find_package.lua2
-rw-r--r--xmake/modules/lib/detect/find_toolname.lua2
-rw-r--r--xmake/modules/net/ping.lua2
-rw-r--r--xmake/modules/package/manager/apt/find_package.lua2
-rw-r--r--xmake/modules/package/manager/nimble/find_package.lua2
-rw-r--r--xmake/modules/package/manager/portage/find_package.lua2
-rw-r--r--xmake/modules/package/manager/system/find_package.lua2
-rw-r--r--xmake/modules/package/manager/zypper/find_package.lua2
-rw-r--r--xmake/modules/package/tools/cmake.lua12
-rw-r--r--xmake/modules/package/tools/gn.lua2
-rw-r--r--xmake/modules/package/tools/meson.lua2
-rw-r--r--xmake/modules/package/tools/msbuild.lua2
-rw-r--r--xmake/modules/private/action/require/impl/actions/download.lua10
-rw-r--r--xmake/modules/private/action/require/impl/actions/download_resources.lua4
-rw-r--r--xmake/modules/private/action/require/impl/actions/install.lua4
-rw-r--r--xmake/modules/private/action/require/impl/actions/patch_sources.lua4
-rw-r--r--xmake/modules/private/action/require/impl/environment.lua2
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua10
-rw-r--r--xmake/modules/private/action/require/impl/package.lua10
-rw-r--r--xmake/modules/private/action/require/impl/register_packages.lua4
-rw-r--r--xmake/modules/private/action/require/impl/utils/requirekey.lua2
-rw-r--r--xmake/modules/private/action/trybuild/autoconf.lua2
-rw-r--r--xmake/modules/private/action/trybuild/cmake.lua8
-rw-r--r--xmake/modules/private/action/trybuild/meson.lua2
-rw-r--r--xmake/modules/private/async/jobpool.lua2
-rw-r--r--xmake/modules/private/async/runjobs.lua6
-rw-r--r--xmake/modules/private/cache/build_cache.lua4
-rw-r--r--xmake/modules/private/check/checkers/clang/tidy.lua2
-rw-r--r--xmake/modules/private/service/distcc_build/client.lua8
-rw-r--r--xmake/modules/private/service/remote_build/client.lua4
-rw-r--r--xmake/modules/private/service/remote_cache/client.lua4
-rw-r--r--xmake/modules/private/service/server.lua4
-rw-r--r--xmake/modules/private/tools/cl/parse_deps.lua2
-rw-r--r--xmake/modules/private/tools/cl/parse_deps_json.lua4
-rw-r--r--xmake/modules/private/tools/gcc/parse_deps.lua4
-rw-r--r--xmake/modules/private/utils/batchcmds.lua8
-rw-r--r--xmake/modules/private/utils/rule_groups.lua2
-rw-r--r--xmake/modules/private/utils/statistics.lua2
-rw-r--r--xmake/modules/private/xrepo/action/fetch.lua2
-rw-r--r--xmake/modules/private/xrepo/action/install.lua2
-rw-r--r--xmake/modules/private/xrepo/action/remove.lua2
-rw-r--r--xmake/modules/target/action/install/unix.lua2
-rw-r--r--xmake/modules/utils/archive/extract.lua4
55 files changed, 105 insertions, 105 deletions
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua
index 78150c117..9f386c8f1 100644
--- a/xmake/modules/core/project/depend.lua
+++ b/xmake/modules/core/project/depend.lua
@@ -73,7 +73,7 @@ function save(dependinfo, dependfile)
io.save(dependfile, dependinfo)
end
--- the dependent info is changed?
+-- Is the dependent info changed?
--
-- if not depend.is_changed(dependinfo, {filemtime = os.mtime(objectfile), values = {...}}) then
-- return
@@ -88,7 +88,7 @@ function is_changed(dependinfo, opt)
return true
end
- -- check the dependent files are changed?
+ -- check whether the dependent files are changed
local lastmtime = opt.lastmtime or 0
_g.files_mtime = _g.files_mtime or {}
local files_mtime = _g.files_mtime
@@ -104,7 +104,7 @@ function is_changed(dependinfo, opt)
end
end
- -- check the dependent values are changed?
+ -- check whether the dependent values are changed
local depvalues = values
local optvalues = table.wrap(opt.values)
if #depvalues ~= #optvalues then
@@ -127,7 +127,7 @@ function is_changed(dependinfo, opt)
end
end
- -- check the dependent files list are changed?
+ -- check whether the dependent files list are changed
if opt.files then
local optfiles = table.wrap(opt.files)
if #files ~= #optfiles then
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index e5addc78a..e69b7d814 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -116,7 +116,7 @@ function nf_symbols(self, levels, target)
-- check and add symbol output file
--
- -- @note we need use `{}` to wrap it to avoid expand it
+ -- @note we need to use `{}` to wrap it to avoid expand it
-- https://github.com/xmake-io/xmake/issues/2061#issuecomment-1042590085
local pdbflags = {"-Fd" .. (target:is_static() and symbolfile or path.join(symboldir, "compile." .. path.filename(symbolfile)))}
if self:has_flags({"-FS", "-Fd" .. os.nuldev() .. ".pdb"}, "cxflags", { flagskey = "-FS -Fd" }) then
@@ -163,7 +163,7 @@ function nf_optimize(self, level)
none = "-Od"
, faster = "-Ox"
, fastest = "-O2 -fp:fast"
- , smallest = "-O1 -GL" -- /GL and (/OPT:REF is on by default in linker), we need enable /ltcg
+ , smallest = "-O1 -GL" -- /GL and (/OPT:REF is on by default in linker), we need to enable /ltcg
, aggressive = "-O2 -fp:fast"
}
return maps[level]
@@ -521,7 +521,7 @@ end
-- compile preprocessed file
function _compile_preprocessed_file(program, cppinfo, opt)
local outdata, errdata = vstool.iorunv(program, winos.cmdargv(table.join(cppinfo.cppflags, "-Fo" .. cppinfo.objectfile, cppinfo.cppfile)), opt)
- -- we need get warning information from output
+ -- we need to get warning information from output
cppinfo.outdata = outdata
cppinfo.errdata = errdata
end
@@ -592,7 +592,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
end
end
- -- we need show full file path to goto error position if xmake is called in vstudio
+ -- we need to show full file path to goto error position if xmake is called in vstudio
-- https://github.com/xmake-io/xmake/issues/1049
if _is_in_vstudio() then
if compflags == flags then
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index cfd5fac5c..60f6ac805 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -112,7 +112,7 @@ function nf_symbol(self, level)
end
return maps[level .. '_' .. kind] or maps[level]
elseif kind == "ld" or kind == "sh" then
- -- we need add `-g` to linker to generate pdb symbol file for mingw-gcc, llvm-clang on windows
+ -- we need to add `-g` to linker to generate pdb symbol file for mingw-gcc, llvm-clang on windows
local plat = self:plat()
if level == "debug" and (plat == "windows" or (plat == "mingw" and is_host("windows"))) then
return "-g"
@@ -426,7 +426,7 @@ end
-- link the target file
--
--- maybe we need use os.vrunv() to show link output when enable verbose information
+-- maybe we need to use os.vrunv() to show link output when enable verbose information
-- @see https://github.com/xmake-io/xmake/discussions/2916
--
function link(self, objectfiles, targetkind, targetfile, flags)
@@ -483,7 +483,7 @@ function _preprocess(program, argv, opt)
end
end
- -- enable "-fdirectives-only"? we need enable it manually
+ -- enable "-fdirectives-only"? we need to enable it manually
--
-- @see https://github.com/xmake-io/xmake/issues/2603
-- https://github.com/xmake-io/xmake/issues/2425
@@ -577,7 +577,7 @@ function _preprocess(program, argv, opt)
table.insert(cppflags, cppfile)
table.insert(cppflags, sourcefile)
- -- we need mark as it when compiling the preprocessed source file
+ -- we need to mark as it when compiling the preprocessed source file
-- it will indicate to the preprocessor that the input file has already been preprocessed.
if is_gcc then
table.insert(flags, "-fpreprocessed")
@@ -605,7 +605,7 @@ end
-- compile preprocessed file
function _compile_preprocessed_file(program, cppinfo, opt)
local outdata, errdata = os.iorunv(program, table.join(cppinfo.cppflags, "-o", cppinfo.objectfile, cppinfo.cppfile), opt)
- -- we need get warning information from output
+ -- we need to get warning information from output
cppinfo.outdata = outdata
cppinfo.errdata = errdata
end
@@ -672,7 +672,7 @@ end
-- get modules cache directory
function _modules_cachedir(target)
- if target and target.autogendir and target:data("cxx.has_modules") then -- we need ignore option instance
+ if target and target.autogendir and target:data("cxx.has_modules") then -- we need to ignore option instance
return path.join(target:autogendir(), "rules", "modules", "cache")
end
end
diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua
index 451954601..042937ed7 100644
--- a/xmake/modules/core/tools/ml.lua
+++ b/xmake/modules/core/tools/ml.lua
@@ -134,7 +134,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
try
{
function ()
- -- @note we need not uses vstool.runv to enable unicode output for ml.exe
+ -- @note we don't need to use vstool.runv to enable unicode output for ml.exe
local program, argv = compargv(self, sourcefile, objectfile, flags)
os.runv(program, argv, {envs = self:runenvs()})
end,
diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua
index 5ef03b912..55146ee76 100644
--- a/xmake/modules/core/tools/rc.lua
+++ b/xmake/modules/core/tools/rc.lua
@@ -93,7 +93,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
try
{
function ()
- -- @note we need not uses vstool.iorunv to enable unicode output for rc.exe
+ -- @note we don't need to use vstool.iorunv to enable unicode output for rc.exe
local program, argv = compargv(self, sourcefile, objectfile, flags)
local outdata, errdata = os.iorunv(program, argv, {envs = self:runenvs()})
return (outdata or "") .. (errdata or "")
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua
index d591a289c..f94f3556e 100644
--- a/xmake/modules/detect/sdks/find_qt.lua
+++ b/xmake/modules/detect/sdks/find_qt.lua
@@ -158,7 +158,7 @@ function _find_qmake(sdkdir, sdkver)
end
end
- -- we need find the default qmake in current system
+ -- we need to find the default qmake in current system
-- maybe we only installed qmake6
if not qmake then
local suffixes = {"", "6", "-qt5"}
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index ee06019eb..0702bee9b 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -105,7 +105,7 @@ function _load_vcvarsall(vcvarsall, vsver, arch, opt)
local genvcvars_bat = os.tmpfile() .. "_genvcvars.bat"
local file = io.open(genvcvars_bat, "w")
file:print("@echo off")
- -- @note we need get utf8 output from cmd.exe
+ -- @note we need to get utf8 output from cmd.exe
-- because some %PATH% and other envs maybe contains unicode characters
if winos.version():gt("winxp") then
file:print("chcp 65001")
diff --git a/xmake/modules/detect/tools/armclang/has_flags.lua b/xmake/modules/detect/tools/armclang/has_flags.lua
index 0c126a26b..965644f2a 100644
--- a/xmake/modules/detect/tools/armclang/has_flags.lua
+++ b/xmake/modules/detect/tools/armclang/has_flags.lua
@@ -80,7 +80,7 @@ end
-- get extension
function _get_extension(opt)
- -- @note we need detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
+ -- @note we need to detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
return (opt.program:endswith("++") or opt.flagkind == "cxxflags") and ".cpp" or (table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c")
end
diff --git a/xmake/modules/detect/tools/cl/has_flags.lua b/xmake/modules/detect/tools/cl/has_flags.lua
index 99da46e63..aced6332d 100644
--- a/xmake/modules/detect/tools/cl/has_flags.lua
+++ b/xmake/modules/detect/tools/cl/has_flags.lua
@@ -75,7 +75,7 @@ function _check_try_running(flags, opt)
return try { function ()
local tmpdir = os.tmpdir()
local _, errs = os.iorunv(opt.program, table.join("-c", "-nologo", flags, "-Fo" .. os.nuldev(), sourcefile),
- {envs = opt.envs, curdir = tmpdir}) -- we need switch to tmpdir to avoid generating some tmp files, e.g. /Zi -> vc140.pdb
+ {envs = opt.envs, curdir = tmpdir}) -- we need to switch to tmpdir to avoid generating some tmp files, e.g. /Zi -> vc140.pdb
if errs and #errs:trim() > 0 then
return false, errs
end
diff --git a/xmake/modules/detect/tools/clang_cl/has_flags.lua b/xmake/modules/detect/tools/clang_cl/has_flags.lua
index 4917fb665..8b8d1b04d 100644
--- a/xmake/modules/detect/tools/clang_cl/has_flags.lua
+++ b/xmake/modules/detect/tools/clang_cl/has_flags.lua
@@ -68,7 +68,7 @@ end
function _check_try_running(flags, opt)
-- get extension
- -- @note we need detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
+ -- @note we need to detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
local extension = opt.program:endswith("++") and ".cpp" or (table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c")
-- make an stub source file
diff --git a/xmake/modules/detect/tools/gcc/has_flags.lua b/xmake/modules/detect/tools/gcc/has_flags.lua
index 3ab51f1ab..99ceb0643 100644
--- a/xmake/modules/detect/tools/gcc/has_flags.lua
+++ b/xmake/modules/detect/tools/gcc/has_flags.lua
@@ -81,7 +81,7 @@ end
-- get extension
function _get_extension(opt)
- -- @note we need detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
+ -- @note we need to detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
return (opt.program:endswith("++") or opt.flagkind == "cxxflags") and ".cpp" or (table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c")
end
diff --git a/xmake/modules/detect/tools/sdcc/has_flags.lua b/xmake/modules/detect/tools/sdcc/has_flags.lua
index c7c440a8a..b911124ff 100644
--- a/xmake/modules/detect/tools/sdcc/has_flags.lua
+++ b/xmake/modules/detect/tools/sdcc/has_flags.lua
@@ -82,7 +82,7 @@ end
function _check_try_running(flags, opt, islinker)
-- get extension
- -- @note we need detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
+ -- @note we need to detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
local extension = opt.program:endswith("++") and ".cpp" or (table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c")
-- make an stub source file
diff --git a/xmake/modules/lib/detect/find_package.lua b/xmake/modules/lib/detect/find_package.lua
index dc1c92848..3fdaf56c7 100644
--- a/xmake/modules/lib/detect/find_package.lua
+++ b/xmake/modules/lib/detect/find_package.lua
@@ -37,7 +37,7 @@ function _concat_packages(a, b)
for k, v in pairs(result) do
if k == "links" then
if type(v) == "table" and #v > 1 then
- -- we need ensure link orders when removing repeat values
+ -- we need to ensure link orders when removing repeat values
v = table.reverse_unique(v)
end
else
diff --git a/xmake/modules/lib/detect/find_toolname.lua b/xmake/modules/lib/detect/find_toolname.lua
index 77ed776d2..8a9541031 100644
--- a/xmake/modules/lib/detect/find_toolname.lua
+++ b/xmake/modules/lib/detect/find_toolname.lua
@@ -24,7 +24,7 @@ import("core.sandbox.module")
-- remove some suffix
--
--- we just remove some known extension, because we need reverse others, e.g. ld.lld, ld64.lld
+-- we just remove some known extension, because we need to reverse others, e.g. ld.lld, ld64.lld
--
function _remove_suffix(name)
local exts = hashset.of("exe", "bat", "sh", "ps1", "ps")
diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua
index add89739c..023d9eaec 100644
--- a/xmake/modules/net/ping.lua
+++ b/xmake/modules/net/ping.lua
@@ -80,7 +80,7 @@ function main(hosts, opt)
if cacheinfo then
cacheinfo[host] = timeval
end
- vprint("pinging for the host(%s) ... %d ms", host, math.floor(timeval))
+ vprint("pinging the host(%s) ... %d ms", host, math.floor(timeval))
end
end
end, {total = #hosts})
diff --git a/xmake/modules/package/manager/apt/find_package.lua b/xmake/modules/package/manager/apt/find_package.lua
index d71a34319..0e833e2ee 100644
--- a/xmake/modules/package/manager/apt/find_package.lua
+++ b/xmake/modules/package/manager/apt/find_package.lua
@@ -37,7 +37,7 @@ function _find_package(dpkg, name, opt)
-- get includedirs
local pos = line:find("include/", 1, true)
if pos then
- -- we need not add includedirs, gcc/clang will use /usr/ as default sysroot
+ -- we don't need to add includedirs, gcc/clang will use /usr/ as default sysroot
result = result or {}
end
diff --git a/xmake/modules/package/manager/nimble/find_package.lua b/xmake/modules/package/manager/nimble/find_package.lua
index c39d6ed34..38eddefa6 100644
--- a/xmake/modules/package/manager/nimble/find_package.lua
+++ b/xmake/modules/package/manager/nimble/find_package.lua
@@ -61,7 +61,7 @@ function main(name, opt)
end
end
end
- -- @note we need not return links and includedirs information,
+ -- @note we don't need return links and includedirs information,
-- because it's nim source code package and nim will find them automatically
return result
end
diff --git a/xmake/modules/package/manager/portage/find_package.lua b/xmake/modules/package/manager/portage/find_package.lua
index 9b2c21340..f08b8e39f 100644
--- a/xmake/modules/package/manager/portage/find_package.lua
+++ b/xmake/modules/package/manager/portage/find_package.lua
@@ -90,7 +90,7 @@ function main(name, opt)
includedirs = table.unique(includedirs)
result = find_package_from_pkgconfig(pkgconfig_name, {configdirs = pkgconfig_dir, linkdirs = linkdirs})
if not result and has_includes then
- -- header only and hidden /usr/include? we need only return empty {}
+ -- header only and hidden /usr/include? we only need to return empty {}
result = {}
end
end
diff --git a/xmake/modules/package/manager/system/find_package.lua b/xmake/modules/package/manager/system/find_package.lua
index 1e0d58c77..55cf839c0 100644
--- a/xmake/modules/package/manager/system/find_package.lua
+++ b/xmake/modules/package/manager/system/find_package.lua
@@ -158,7 +158,7 @@ function _find_package_from_xcodedirs(name, links, opt)
end
end
if result then
- -- we need not add linkdirs again if we are building target on the current platform (with -isysroot)
+ -- we don't need to add linkdirs again if we are building target on the current platform (with -isysroot)
if config.plat() ~= opt.plat or config.arch() ~= opt.arch then
result.linkdirs = linkdirs
result.includedirs = includedirs
diff --git a/xmake/modules/package/manager/zypper/find_package.lua b/xmake/modules/package/manager/zypper/find_package.lua
index 1840de5c2..ea5651004 100644
--- a/xmake/modules/package/manager/zypper/find_package.lua
+++ b/xmake/modules/package/manager/zypper/find_package.lua
@@ -42,7 +42,7 @@ function _find_package(rpm, name, opt)
-- get includedirs
local pos = line:find("include/", 1, true)
if pos then
- -- we need not add includedirs, gcc/clang will use /usr/ as default sysroot
+ -- we don't need to add includedirs, gcc/clang will use /usr/ as default sysroot
result = result or {}
end
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 13b0e03df..d30ecb52c 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -86,7 +86,7 @@ end
-- get msvc
function _get_msvc(package)
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
- assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
return msvc
end
@@ -506,7 +506,7 @@ function _get_configs_for_cross(package, configs, opt)
envs.CMAKE_CXX_COMPILER = _translate_bin_path(cxx)
end
-- @note The link command line is set in Modules/CMake{C,CXX,Fortran}Information.cmake and defaults to using the compiler, not CMAKE_LINKER,
- -- so we need set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
+ -- so we need to set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
--
-- https://github.com/xmake-io/xmake-repo/pull/1039
-- https://stackoverflow.com/questions/1867745/cmake-use-a-custom-linker/25274328#25274328
@@ -522,7 +522,7 @@ function _get_configs_for_cross(package, configs, opt)
envs.CMAKE_STATIC_LINKER_FLAGS = table.concat(table.wrap(package:build_getenv("arflags")), ' ')
envs.CMAKE_EXE_LINKER_FLAGS = _get_ldflags(package, opt)
envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt)
- -- we need not set it as cross compilation if we just pass toolchain
+ -- we don't need to set it as cross compilation if we just pass toolchain
-- https://github.com/xmake-io/xmake/issues/2170
if not package:is_plat(os.subhost()) then
local system_name = package:targetos() or "Linux"
@@ -596,7 +596,7 @@ function _get_configs_for_host_toolchain(package, configs, opt)
envs.CMAKE_STATIC_LINKER_FLAGS = table.concat(table.wrap(package:build_getenv("arflags")), ' ')
envs.CMAKE_EXE_LINKER_FLAGS = _get_ldflags(package, opt)
envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt)
- -- we need not set it as cross compilation if we just pass toolchain
+ -- we don't need to set it as cross compilation if we just pass toolchain
-- https://github.com/xmake-io/xmake/issues/2170
if not package:is_plat(os.subhost()) then
envs.CMAKE_SYSTEM_NAME = "Linux"
@@ -719,7 +719,7 @@ end
-- get build environments
function buildenvs(package, opt)
- -- we need bind msvc environments manually
+ -- we need to bind msvc environments manually
-- @see https://github.com/xmake-io/xmake/issues/1057
opt = opt or {}
local envs = {}
@@ -727,7 +727,7 @@ function buildenvs(package, opt)
envs = _get_msvc_runenvs(package)
end
- -- we need pass pkgconf for windows/mingw without msys2/cygwin
+ -- we need to pass pkgconf for windows/mingw without msys2/cygwin
if package:is_plat("windows", "mingw") and is_subhost("windows") then
local pkgconf = find_tool("pkgconf")
if pkgconf then
diff --git a/xmake/modules/package/tools/gn.lua b/xmake/modules/package/tools/gn.lua
index 221ca92e9..8684482e4 100644
--- a/xmake/modules/package/tools/gn.lua
+++ b/xmake/modules/package/tools/gn.lua
@@ -76,7 +76,7 @@ end
-- get msvc
function _get_msvc(package)
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
- assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
return msvc
end
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 89fff1423..c4057ee32 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -310,7 +310,7 @@ end
-- get msvc
function _get_msvc(package)
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
- assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
return msvc
end
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua
index 21fd2e693..5897c357f 100644
--- a/xmake/modules/package/tools/msbuild.lua
+++ b/xmake/modules/package/tools/msbuild.lua
@@ -32,7 +32,7 @@ end
-- get msvc
function _get_msvc(package)
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
- assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
return msvc
end
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua
index 182765e8a..a50f3b1a9 100644
--- a/xmake/modules/private/action/require/impl/actions/download.lua
+++ b/xmake/modules/private/action/require/impl/actions/download.lua
@@ -81,7 +81,7 @@ function _checkout(package, url, sourcedir, opt)
-- remove temporary directory
os.rm(sourcedir .. ".tmp")
- -- we need enable longpaths on windows
+ -- we need to enable longpaths on windows
local longpaths = package:policy("platform.longpaths")
-- download package from branches?
@@ -89,7 +89,7 @@ function _checkout(package, url, sourcedir, opt)
local branch = package:branch()
if branch then
- -- we need select the correct default branch
+ -- we need to select the correct default branch
-- @see https://github.com/xmake-io/xmake/issues/3248
if branch == "@default" then
branch = nil
@@ -132,7 +132,7 @@ function _download(package, url, sourcedir, opt)
-- get sourcehash from the given url
--
- -- we need not sourcehash and skip checksum to try download it directly if no version list in package()
+ -- we don't need sourcehash and skip checksum to try download it directly if no version list in package()
-- @see https://github.com/xmake-io/xmake/issues/930
-- https://github.com/xmake-io/xmake/issues/1009
--
@@ -198,7 +198,7 @@ function _download(package, url, sourcedir, opt)
local filedirs = os.filedirs(path.join(sourcedir_tmp, "*"))
if #filedirs == 1 and os.isdir(filedirs[1]) then
os.mv(filedirs[1], sourcedir)
- -- we need anchor it to avoid expand it when installing package
+ -- we need to anchor it to avoid expand it when installing package
io.writefile(path.join(sourcedir, "__sourceroot_anchor__.txt"), "")
os.rm(sourcedir_tmp)
else
@@ -212,7 +212,7 @@ function _download(package, url, sourcedir, opt)
os.mkdir(sourcedir)
raise("cannot extract %s, maybe missing extractor or invalid package file!", packagefile)
else
- -- if it is not archive file, we need only create empty source file and use package:originfile()
+ -- if it is not archive file, we only need to create empty source file and use package:originfile()
os.tryrm(sourcedir)
os.mkdir(sourcedir)
end
diff --git a/xmake/modules/private/action/require/impl/actions/download_resources.lua b/xmake/modules/private/action/require/impl/actions/download_resources.lua
index 129473430..194afd3e6 100644
--- a/xmake/modules/private/action/require/impl/actions/download_resources.lua
+++ b/xmake/modules/private/action/require/impl/actions/download_resources.lua
@@ -68,7 +68,7 @@ function _checkout(package, resource_name, resource_url, resource_revision)
-- remove temporary directory
os.rm(resourcedir)
- -- we need enable longpaths on windows
+ -- we need to enable longpaths on windows
local longpaths = package:policy("platform.longpaths")
-- clone whole history and tags
@@ -143,7 +143,7 @@ end
-- download all resources of the given package
function main(package)
- -- we need not download it if we use the precompiled artifacts to install package
+ -- we don't need to download it if we use the precompiled artifacts to install package
if package:is_precompiled() then
return
end
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua
index dbb4d26c9..1610d0241 100644
--- a/xmake/modules/private/action/require/impl/actions/install.lua
+++ b/xmake/modules/private/action/require/impl/actions/install.lua
@@ -202,7 +202,7 @@ function _fix_paths_for_precompiled_package(package)
for _, file in ipairs(os.files(filepattern)) do
if remote_prefix then
local _, count = io.replace(file, remote_prefix, local_prefix, {plain = true})
- -- maybe we need translate path seperator
+ -- maybe we need to translate path seperator
-- @see https://github.com/xmake-io/xmake/discussions/3008
if count == 0 and is_host("windows") then
io.replace(file, (remote_prefix:gsub("\\", "/")), local_prefix:gsub("\\", "/"), {plain = true})
@@ -275,7 +275,7 @@ function _enter_workdir(package)
oldir = os.cd(workdir)
end
- -- we need copy source codes to the working directory with short path on windows
+ -- we need to copy source codes to the working directory with short path on windows
--
-- Because the target name and source file path of this project are too long,
-- it's absolute path exceeds the windows path length limit.
diff --git a/xmake/modules/private/action/require/impl/actions/patch_sources.lua b/xmake/modules/private/action/require/impl/actions/patch_sources.lua
index c6ba8607d..5306fbb9a 100644
--- a/xmake/modules/private/action/require/impl/actions/patch_sources.lua
+++ b/xmake/modules/private/action/require/impl/actions/patch_sources.lua
@@ -30,7 +30,7 @@ function _check_sha256(patch_hash, patch_file)
local ok = (patch_hash == hash.sha256(patch_file))
if not ok and is_host("windows") then
-- `git pull` maybe will replace lf to crlf in the patch text automatically on windows.
- -- so we need attempt to fix this sha256
+ -- so we need to attempt to fix this sha256
--
-- @see
-- https://github.com/xmake-io/xmake-repo/pull/67
@@ -104,7 +104,7 @@ end
-- patch the given package
function main(package)
- -- we need not patch it if we use the precompiled artifacts to install package
+ -- we don't need to patch it if we use the precompiled artifacts to install package
if package:is_precompiled() then
return
end
diff --git a/xmake/modules/private/action/require/impl/environment.lua b/xmake/modules/private/action/require/impl/environment.lua
index aa44dcefe..8d7dbdcc0 100644
--- a/xmake/modules/private/action/require/impl/environment.lua
+++ b/xmake/modules/private/action/require/impl/environment.lua
@@ -58,7 +58,7 @@ function enter()
instance:envs_enter()
end
- -- we need force to detect and flush detect cache after loading all environments
+ -- we need to force to detect and flush detect cache after loading all environments
if not git then
find_tool("git", {force = true})
end
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index f126445e4..22dcbfe48 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -371,7 +371,7 @@ end
-- install packages
function _install_packages(packages_install, packages_download, installdeps)
- -- we need hide wait characters if is not a tty
+ -- we need to hide wait characters if is not a tty
local show_wait = io.isatty()
-- init installed packages
@@ -478,7 +478,7 @@ function _install_packages(packages_install, packages_download, installdeps)
if downloaded then
if not action_install(instance) then
assert(instance:is_precompiled(), "package(%s) should be precompiled", instance:name())
- -- we need disable built and re-download and re-install it
+ -- we need to disable built and re-download and re-install it
instance:fallback_build()
action_download(instance)
action_install(instance)
@@ -628,7 +628,7 @@ function _get_package_installdeps(packages)
local installdeps = {}
local packagesmap = {}
for _, instance in ipairs(packages) do
- -- we need use alias name first for toolchain/packages
+ -- we need to use alias name first for toolchain/packages
packagesmap[instance:alias() or instance:name()] = instance
end
for _, instance in ipairs(packages) do
@@ -636,7 +636,7 @@ function _get_package_installdeps(packages)
if instance:orderdeps() then
deps = table.copy(instance:orderdeps())
end
- -- patch toolchain/packages to installdeps, because we need install toolchain package first
+ -- patch toolchain/packages to installdeps, because we need to install toolchain package first
for _, toolchain in ipairs(instance:toolchains()) do
for _, packagename in ipairs(toolchain:config("packages")) do
if packagesmap[packagename] ~= instance then -- avoid loop recursion
@@ -766,7 +766,7 @@ function main(requires, opt)
print("upgrading packages ..")
end
- -- some packages are modified? we need fix packages list and all deps
+ -- some packages are modified? we need to fix packages list and all deps
if packages_modified then
order_packages = {}
_replace_packages(packages, packages_modified)
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index f42ea495c..6f5cc75d2 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -144,7 +144,7 @@ function _load_require(require_str, requires_extra, parentinfo)
end
-- get required building configurations
- -- we need clone a new configs object, because the whole requireinfo will be modified later.
+ -- we need to clone a new configs object, because the whole requireinfo will be modified later.
-- @see https://github.com/xmake-io/xmake-repo/pull/2067
local require_build_configs = table.clone(require_extra.configs or require_extra.config)
if require_extra.debug then
@@ -155,7 +155,7 @@ function _load_require(require_str, requires_extra, parentinfo)
-- require packge in the current host platform
if require_extra.host then
if is_subhost(core_package.targetplat()) and os.subarch() == core_package.targetarch() then
- -- we need pass plat/arch to avoid repeat installation
+ -- we need to pass plat/arch to avoid repeat installation
-- @see https://github.com/xmake-io/xmake/issues/1579
else
require_extra.plat = os.subhost()
@@ -513,7 +513,7 @@ function _finish_requireinfo(requireinfo, package)
requireinfo.configs.vs_runtime = "MT"
end
end
- -- we need ensure readonly configs
+ -- we need to ensure readonly configs
for _, name in ipairs(table.keys(requireinfo.configs)) do
local current = requireinfo.configs[name]
local default = package:extraconf("configs", name, "default")
@@ -852,7 +852,7 @@ function _load_package(packagename, requireinfo, opt)
-- check package configurations
_check_package_configurations(package)
- -- save artifacts info, we need add it at last before buildhash need depend on package configurations
+ -- save artifacts info, we need to add it at last before buildhash need depend on package configurations
-- it will switch to install precompiled binary package from xmake-mirror/build-artifacts
if from_repo and not option.get("build") and not requireinfo.build then
local artifacts_manifest = repository.artifacts_manifest(packagename, version)
@@ -1084,7 +1084,7 @@ function should_install(package, opt)
if package:exists() and _compatible_with_previous_librarydeps(package, opt) then
return false
end
- -- we need not install it if this package need only be fetched
+ -- we don't need to install it if this package only need to be fetched
if package:is_fetchonly() then
return false
end
diff --git a/xmake/modules/private/action/require/impl/register_packages.lua b/xmake/modules/private/action/require/impl/register_packages.lua
index 613cda5a3..ae66b6e75 100644
--- a/xmake/modules/private/action/require/impl/register_packages.lua
+++ b/xmake/modules/private/action/require/impl/register_packages.lua
@@ -39,14 +39,14 @@ function _register_required_package_libs(instance, required_package, is_deps)
if fetchinfo then
fetchinfo.name = nil
if is_deps then
- -- we need only reserve license for root package
+ -- we only need reserve license for root package
--
-- @note the license compatibility between the root package and
-- its dependent packages is guaranteed by the root package itself
--
fetchinfo.license = nil
- -- we need only some infos for root package
+ -- we only need some infos for root package
fetchinfo.version = nil
fetchinfo.static = nil
fetchinfo.shared = nil
diff --git a/xmake/modules/private/action/require/impl/utils/requirekey.lua b/xmake/modules/private/action/require/impl/utils/requirekey.lua
index c696c1b8f..e44679f92 100644
--- a/xmake/modules/private/action/require/impl/utils/requirekey.lua
+++ b/xmake/modules/private/action/require/impl/utils/requirekey.lua
@@ -66,7 +66,7 @@ function main(requireinfo, opt)
end
if opt.hash then
if key == "" then
- key = "_" -- we need generate a fixed hash value
+ key = "_" -- we need to generate a fixed hash value
end
return hash.uuid(key):split("-", {plain = true})[1]:lower()
else
diff --git a/xmake/modules/private/action/trybuild/autoconf.lua b/xmake/modules/private/action/trybuild/autoconf.lua
index f46cda6ef..9b5ac71f8 100644
--- a/xmake/modules/private/action/trybuild/autoconf.lua
+++ b/xmake/modules/private/action/trybuild/autoconf.lua
@@ -154,7 +154,7 @@ function _get_buildenvs()
name = name:gsub("g%+%+%-%d+", "ld")
envs.LD = dir and path.join(dir, name) or name
end
- -- we need use clang++ as cxx, autoconf will use it as linker
+ -- we need to use clang++ as cxx, autoconf will use it as linker
-- https://github.com/xmake-io/xmake/issues/2170
local cxx = envs.CXX
if cxx then
diff --git a/xmake/modules/private/action/trybuild/cmake.lua b/xmake/modules/private/action/trybuild/cmake.lua
index f4b78fdf7..66e407ec3 100644
--- a/xmake/modules/private/action/trybuild/cmake.lua
+++ b/xmake/modules/private/action/trybuild/cmake.lua
@@ -52,7 +52,7 @@ end
-- get msvc
function _get_msvc()
local msvc = toolchain.load("msvc")
- assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
return msvc
end
@@ -235,7 +235,7 @@ function _get_configs_for_cross(configs)
envs.CMAKE_CXX_COMPILER = _translate_bin_path(dir and path.join(dir, name) or name)
end
-- @note The link command line is set in Modules/CMake{C,CXX,Fortran}Information.cmake and defaults to using the compiler, not CMAKE_LINKER,
- -- so we need set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
+ -- so we need to set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
--
-- https://github.com/xmake-io/xmake-repo/pull/1039
-- https://stackoverflow.com/questions/1867745/cmake-use-a-custom-linker/25274328#25274328
@@ -289,7 +289,7 @@ function _get_configs_for_host_toolchain(configs)
envs.CMAKE_CXX_COMPILER = _translate_bin_path(dir and path.join(dir, name) or name)
end
-- @note The link command line is set in Modules/CMake{C,CXX,Fortran}Information.cmake and defaults to using the compiler, not CMAKE_LINKER,
- -- so we need set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
+ -- so we need to set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.
--
-- https://github.com/xmake-io/xmake-repo/pull/1039
-- https://stackoverflow.com/questions/1867745/cmake-use-a-custom-linker/25274328#25274328
@@ -305,7 +305,7 @@ function _get_configs_for_host_toolchain(configs)
envs.CMAKE_STATIC_LINKER_FLAGS = table.concat(table.wrap(_get_buildenv("arflags")), ' ')
envs.CMAKE_EXE_LINKER_FLAGS = table.concat(table.wrap(_get_buildenv("ldflags")), ' ')
envs.CMAKE_SHARED_LINKER_FLAGS = table.concat(table.wrap(_get_buildenv("shflags")), ' ')
- -- we need not set it as cross compilation if we just pass toolchain
+ -- we don't need to set it as cross compilation if we just pass toolchain
-- https://github.com/xmake-io/xmake/issues/2170
if not is_plat(os.subhost()) then
envs.CMAKE_SYSTEM_NAME = "Linux"
diff --git a/xmake/modules/private/action/trybuild/meson.lua b/xmake/modules/private/action/trybuild/meson.lua
index 0530702e6..2e0d7cb20 100644
--- a/xmake/modules/private/action/trybuild/meson.lua
+++ b/xmake/modules/private/action/trybuild/meson.lua
@@ -81,7 +81,7 @@ function _get_cross_file(buildir)
file:print("[binaries]")
local cc = _get_buildenv("cc")
if cc then
- -- we need split it, maybe is `xcrun -sdk iphoneos clang`
+ -- we need to split it, maybe is `xcrun -sdk iphoneos clang`
file:print("c=['%s']", table.concat(os.argv(cc), "', '"))
end
local cxx = _get_buildenv("cxx")
diff --git a/xmake/modules/private/async/jobpool.lua b/xmake/modules/private/async/jobpool.lua
index 0b20cd5f4..7f9067343 100644
--- a/xmake/modules/private/async/jobpool.lua
+++ b/xmake/modules/private/async/jobpool.lua
@@ -123,7 +123,7 @@ function jobpool:pop()
-- update all parents nodes
for _, p in ipairs(parents) do
- -- we need avoid add it the leafjobs repeatly, it will cause dead-loop when poping group job
+ -- we need to avoid adding it to leafjobs repeatly, it will cause dead-loop when poping group job
-- @see https://github.com/xmake-io/xmake/issues/2740
if not p._leaf then
p._priority = math.max(p._priority or 0, priority + 1)
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua
index 66ccf61b1..98ad63747 100644
--- a/xmake/modules/private/async/runjobs.lua
+++ b/xmake/modules/private/async/runjobs.lua
@@ -67,7 +67,7 @@ function main(name, jobs, opt)
assert(jobs, "runjobs: no jobs!")
-- show waiting tips?
- local showprogress = io.isatty() and (opt.progress or opt.showtips) -- we need hide wait characters if is not a tty
+ local showprogress = io.isatty() and (opt.progress or opt.showtips) -- we need to hide wait characters if is not a tty
local progress_helper
local backnum = 0
if showprogress then
@@ -186,7 +186,7 @@ function main(name, jobs, opt)
break
end
- -- priority changed? we need wait all running jobs exited
+ -- priority changed? we need to wait all running jobs exited
priority_curr = priority or priority_prev
assert(priority_curr >= priority_prev, "runjobs: invalid priority(%d < %d)!", priority_curr, priority_prev)
if priority_curr > priority_prev then
@@ -261,7 +261,7 @@ function main(name, jobs, opt)
end
end)
- -- need only one job exited if be same priority
+ -- only need one job exited if be same priority
if priority_curr == priority_prev then
scheduler.co_group_wait(group_name, {limit = 1})
else
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua
index bac6c069b..b0960c37a 100644
--- a/xmake/modules/private/cache/build_cache.lua
+++ b/xmake/modules/private/cache/build_cache.lua
@@ -260,10 +260,10 @@ function build(program, argv, opt)
local objectfile_cached, objectfile_infofile = get(cachekey)
if objectfile_cached then
os.cp(objectfile_cached, cppinfo.objectfile)
- -- we need update mtime for incremental compilation
+ -- we need to update mtime for incremental compilation
-- @see https://github.com/xmake-io/xmake/issues/2620
os.touch(cppinfo.objectfile, {mtime = os.time()})
- -- we need get outdata/errdata to show warnings,
+ -- we need to get outdata/errdata to show warnings,
-- @see https://github.com/xmake-io/xmake/issues/2452
if objectfile_infofile and os.isfile(objectfile_infofile) then
local extrainfo = io.load(objectfile_infofile)
diff --git a/xmake/modules/private/check/checkers/clang/tidy.lua b/xmake/modules/private/check/checkers/clang/tidy.lua
index 6498ab093..9d735e546 100644
--- a/xmake/modules/private/check/checkers/clang/tidy.lua
+++ b/xmake/modules/private/check/checkers/clang/tidy.lua
@@ -170,7 +170,7 @@ function main(argv)
instance:envs_enter()
end
- -- we need force to detect and flush detect cache after loading all environments
+ -- we need to force detect and flush detect cache after loading all environments
if not clang_tidy then
clang_tidy = find_tool("clang-tidy", {force = true})
end
diff --git a/xmake/modules/private/service/distcc_build/client.lua b/xmake/modules/private/service/distcc_build/client.lua
index 38b2145ef..89715f024 100644
--- a/xmake/modules/private/service/distcc_build/client.lua
+++ b/xmake/modules/private/service/distcc_build/client.lua
@@ -53,7 +53,7 @@ function distcc_build_client:init()
self._PROJECTDIR = projectdir
self._WORKDIR = path.join(project_config.directory(), "distcc_build")
else
- raise("we need enter a project directory with xmake.lua first!")
+ raise("we need to enter a project directory with xmake.lua first!")
end
-- init timeout
@@ -249,10 +249,10 @@ function distcc_build_client:compile(program, argv, opt)
local objectfile_cached, objectfile_infofile = build_cache.get(cachekey)
if objectfile_cached then
os.cp(objectfile_cached, cppinfo.objectfile)
- -- we need update mtime for incremental compilation
+ -- we need to update mtime for incremental compilation
-- @see https://github.com/xmake-io/xmake/issues/2620
os.touch(cppinfo.objectfile, {mtime = os.time()})
- -- we need get outdata/errdata to show warnings,
+ -- we need to get outdata/errdata to show warnings,
-- @see https://github.com/xmake-io/xmake/issues/2452
if objectfile_infofile and os.isfile(objectfile_infofile) then
local extrainfo = io.load(objectfile_infofile)
@@ -526,7 +526,7 @@ function distcc_build_client:_connect_host(host)
return
end
- -- we need user authorization?
+ -- Do we need user authorization?
local user = host.user
local token = host.token
if not token and user then
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua
index d63a4f9ad..65e41eaf1 100644
--- a/xmake/modules/private/service/remote_build/client.lua
+++ b/xmake/modules/private/service/remote_build/client.lua
@@ -52,7 +52,7 @@ function remote_build_client:init()
self._PROJECTDIR = projectdir
self._WORKDIR = path.join(project_config.directory(), "remote_build")
else
- raise("we need enter a project directory with xmake.lua first!")
+ raise("we need to enter a project directory with xmake.lua first!")
end
-- init filesync
@@ -79,7 +79,7 @@ function remote_build_client:connect()
return
end
- -- we need user authorization?
+ -- Do we need user authorization?
local token = config.get("remote_build.token")
if not token and self:user() then
diff --git a/xmake/modules/private/service/remote_cache/client.lua b/xmake/modules/private/service/remote_cache/client.lua
index cd3d8d7d7..b6c4d8354 100644
--- a/xmake/modules/private/service/remote_cache/client.lua
+++ b/xmake/modules/private/service/remote_cache/client.lua
@@ -52,7 +52,7 @@ function remote_cache_client:init()
self._PROJECTDIR = projectdir
self._WORKDIR = path.join(project_config.directory(), "remote_cache")
else
- raise("we need enter a project directory with xmake.lua first!")
+ raise("we need to enter a project directory with xmake.lua first!")
end
-- init sockets
@@ -77,7 +77,7 @@ function remote_cache_client:connect()
return
end
- -- we need user authorization?
+ -- Do we need user authorization?
local token = config.get("remote_cache.token")
if not token and self:user() then
diff --git a/xmake/modules/private/service/server.lua b/xmake/modules/private/service/server.lua
index 891942a03..04cf7dd5f 100644
--- a/xmake/modules/private/service/server.lua
+++ b/xmake/modules/private/service/server.lua
@@ -112,7 +112,7 @@ function server:known_hosts_set(hosts)
self._KNOWN_HOSTS = hosts and hashset.from(hosts) or hashset.new()
end
--- we need verify user
+-- we need to verify user
function server:need_verfiy()
return not self:tokens():empty()
end
@@ -120,7 +120,7 @@ end
-- verify user
function server:verify_user(token, peeraddr)
if not token then
- return false, "client has no authorization, we need add username to connect address or token!"
+ return false, "client has no authorization, we need to add username to connect address or token!"
end
-- check authorization
diff --git a/xmake/modules/private/tools/cl/parse_deps.lua b/xmake/modules/private/tools/cl/parse_deps.lua
index 5a0cfe27d..187d655cd 100644
--- a/xmake/modules/private/tools/cl/parse_deps.lua
+++ b/xmake/modules/private/tools/cl/parse_deps.lua
@@ -73,7 +73,7 @@ function _normailize_dep(dep, projectdir)
if dep:startswith(projectdir) then
return path.relative(dep, projectdir)
else
- -- we need also check header files outside project
+ -- we also need to check header files outside project
-- https://github.com/xmake-io/xmake/issues/1154
return dep
end
diff --git a/xmake/modules/private/tools/cl/parse_deps_json.lua b/xmake/modules/private/tools/cl/parse_deps_json.lua
index 459a8b112..50f728815 100644
--- a/xmake/modules/private/tools/cl/parse_deps_json.lua
+++ b/xmake/modules/private/tools/cl/parse_deps_json.lua
@@ -73,7 +73,7 @@ function _normailize_dep(dep, projectdir)
if dep:startswith(projectdir) then
return path.relative(dep, projectdir)
else
- -- we need also check header files outside project
+ -- we also need to check header files outside project
-- https://github.com/xmake-io/xmake/issues/1154
return dep
end
@@ -132,7 +132,7 @@ function main(depsdata)
-- translate it
local results = hashset.new()
- local projectdir = os.projectdir():lower() -- we need generate lower string, because json values are all lower
+ local projectdir = os.projectdir():lower() -- we need to generate lower string, because json values are all lower
for _, includefile in ipairs(includes) do
includefile = _normailize_dep(includefile, projectdir)
if includefile then
diff --git a/xmake/modules/private/tools/gcc/parse_deps.lua b/xmake/modules/private/tools/gcc/parse_deps.lua
index 3bc067861..24ff67f09 100644
--- a/xmake/modules/private/tools/gcc/parse_deps.lua
+++ b/xmake/modules/private/tools/gcc/parse_deps.lua
@@ -35,7 +35,7 @@ function _normailize_dep(dep, projectdir)
if dep:startswith(projectdir) then
return path.relative(dep, projectdir)
else
- -- we need also check header files outside project
+ -- we also need to check header files outside project
-- https://github.com/xmake-io/xmake/issues/1154
return dep
end
@@ -72,7 +72,7 @@ function main(depsdata, opt)
local plain = {plain = true}
line = line:replace("\\ ", space_placeholder, plain)
for _, includefile in ipairs(line:split(' ', plain)) do -- it will trim all internal spaces without `{strict = true}`
- -- some gcc toolchains will some invalid paths (e.g. `d\:\xxx`), we need fix it
+ -- some gcc toolchains will some invalid paths (e.g. `d\:\xxx`), we need to fix it
-- https://github.com/xmake-io/xmake/issues/1196
if is_host("windows") and includefile:match("^%w\\:") then
includefile = includefile:replace("\\:", ":", plain)
diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua
index 5948fe0cf..48d169b22 100644
--- a/xmake/modules/private/utils/batchcmds.lua
+++ b/xmake/modules/private/utils/batchcmds.lua
@@ -236,7 +236,7 @@ function batchcmds:compile(sourcefiles, objectfile, opt)
opt = opt or {}
opt.target = self._TARGET
- -- wrap path for sourcefiles, because we need translate path for project generator
+ -- wrap path for sourcefiles, because we need to translate path for project generator
if type(sourcefiles) == "table" then
local sourcefiles_wrap = {}
for _, sourcefile in ipairs(sourcefiles) do
@@ -274,7 +274,7 @@ function batchcmds:compilev(argv, opt)
compiler_inst = compiler.load(sourcekind, opt)
end
- -- we need translate path for the project generator
+ -- we need to translate path for the project generator
for idx, item in ipairs(argv) do
if type(item) == "string" then
if item:startswith("-I") then
@@ -299,7 +299,7 @@ function batchcmds:link(objectfiles, targetfile, opt)
opt = opt or {}
opt.target = target
- -- wrap path for objectfiles, because we need translate path for project generator
+ -- wrap path for objectfiles, because we need to translate path for project generator
local objectfiles_wrap = {}
for _, objectfile in ipairs(objectfiles) do
table.insert(objectfiles_wrap, path(objectfile))
@@ -310,7 +310,7 @@ function batchcmds:link(objectfiles, targetfile, opt)
local linker_inst = target and target:linker() or linker.load(opt.targetkind, opt.sourcekinds, opt)
local program, argv = linker_inst:linkargv(objectfiles, path(targetfile), opt)
- -- we need translate path for the project generator
+ -- we need to translate path for the project generator
for idx, item in ipairs(argv) do
if type(item) == "string" then
if item:startswith("-L") then
diff --git a/xmake/modules/private/utils/rule_groups.lua b/xmake/modules/private/utils/rule_groups.lua
index f8f8181ec..ae7279e78 100644
--- a/xmake/modules/private/utils/rule_groups.lua
+++ b/xmake/modules/private/utils/rule_groups.lua
@@ -25,7 +25,7 @@ import("core.project.config")
import("core.project.project")
-- get rule
--- @note we need get rule from target first, because we maybe will inject and replace builtin rule in target
+-- @note we need to get rule from target first, because we maybe will inject and replace builtin rule in target
function get_rule(target, rulename)
local ruleinst = assert(target:rule(rulename) or project.rule(rulename) or rule.rule(rulename), "unknown rule: %s", rulename)
return ruleinst
diff --git a/xmake/modules/private/utils/statistics.lua b/xmake/modules/private/utils/statistics.lua
index 7619526a5..615cfce79 100644
--- a/xmake/modules/private/utils/statistics.lua
+++ b/xmake/modules/private/utils/statistics.lua
@@ -68,7 +68,7 @@ function post()
return
end
- -- mark as posted first, avoid to post it repeatly
+ -- mark as posted first, avoid posting it repeatly
io.writefile(markfile, "ok")
-- init argument list
diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua
index 1b9071be5..b54294a68 100644
--- a/xmake/modules/private/xrepo/action/fetch.lua
+++ b/xmake/modules/private/xrepo/action/fetch.lua
@@ -203,7 +203,7 @@ function _fetch_packages(packages)
end
end
if not packagefile then
- -- avoid to override extra configs in add_requires/xmake.lua
+ -- avoid overriding extra configs in add_requires/xmake.lua
if extra then
local extra_str = string.serialize(extra, {indent = false, strip = true})
table.insert(require_argv, "--extra=" .. extra_str)
diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua
index 99764ab77..90aff97ca 100644
--- a/xmake/modules/private/xrepo/action/install.lua
+++ b/xmake/modules/private/xrepo/action/install.lua
@@ -290,7 +290,7 @@ function _install_packages(packages)
end
end
if not packagefile then
- -- avoid to override extra configs in add_requires/xmake.lua
+ -- avoid overriding extra configs in add_requires/xmake.lua
if extra then
local extra_str = string.serialize(extra, {indent = false, strip = true})
table.insert(require_argv, "--extra=" .. extra_str)
diff --git a/xmake/modules/private/xrepo/action/remove.lua b/xmake/modules/private/xrepo/action/remove.lua
index 1ccfa140e..dd850deb6 100644
--- a/xmake/modules/private/xrepo/action/remove.lua
+++ b/xmake/modules/private/xrepo/action/remove.lua
@@ -177,7 +177,7 @@ function _remove_packages(packages)
end
end
if not packagefile then
- -- avoid to override extra configs in add_requires/xmake.lua
+ -- avoid overriding extra configs in add_requires/xmake.lua
if extra then
local extra_str = string.serialize(extra, {indent = false, strip = true})
table.insert(require_argv, "--extra=" .. extra_str)
diff --git a/xmake/modules/target/action/install/unix.lua b/xmake/modules/target/action/install/unix.lua
index 341d2ddd0..ed49460dc 100644
--- a/xmake/modules/target/action/install/unix.lua
+++ b/xmake/modules/target/action/install/unix.lua
@@ -52,7 +52,7 @@ function _install_shared_for_package(target, pkg, outputdir)
-- rm because symlink cannot overwrite existing file
os.rm(targetname)
end
- -- we need reserve symlink
+ -- we need to reserve symlink
-- @see https://github.com/xmake-io/xmake/issues/1582
os.vcp(sopath, outputdir, {symlink = true})
_g.installed_libfiles[sopath] = true
diff --git a/xmake/modules/utils/archive/extract.lua b/xmake/modules/utils/archive/extract.lua
index 620c84d69..f1213f275 100644
--- a/xmake/modules/utils/archive/extract.lua
+++ b/xmake/modules/utils/archive/extract.lua
@@ -115,7 +115,7 @@ function _extract_using_7z(archivefile, outputdir, extension, opt)
outputdir = os.tmpfile({ramdisk = false}) .. ".tar"
end
- -- on msys2/cygwin? we need translate input path to cygwin-like path
+ -- on msys2/cygwin? we need to translate input path to cygwin-like path
if is_subhost("msys", "cygwin") and program:gsub("\\", "/"):find("/usr/bin") then
archivefile = path.cygwin_path(archivefile)
end
@@ -331,7 +331,7 @@ function _extract_using_bzip2(archivefile, outputdir, extension, opt)
outputdir = os.tmpfile({ramdisk = false}) .. ".tar"
end
- -- on msys2/cygwin? we need translate input path to cygwin-like path
+ -- on msys2/cygwin? we need to translate input path to cygwin-like path
if is_subhost("msys", "cygwin") and program:gsub("\\", "/"):find("/usr/bin") then
archivefile = path.cygwin_path(archivefile)
end