summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl
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/private/action/require/impl
parentca83e9a78b7f2d45e833fa705c880867ad2381c6 (diff)
Fix grammar
Diffstat (limited to 'xmake/modules/private/action/require/impl')
-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
9 files changed, 25 insertions, 25 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