diff options
Diffstat (limited to 'xmake/modules/private')
29 files changed, 62 insertions, 62 deletions
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) |
