summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-11 00:54:08 +0800
committerruki <[email protected]>2024-10-11 00:54:08 +0800
commitc189bb54bc616f219d7881c032a207fdaa385a17 (patch)
tree558bb98806ae93e5bd085a392578371628a5d807 /xmake/modules
parent09ee92711986cb729d89c23c1802156bd335a602 (diff)
improve hash
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/impl/repository.lua2
-rw-r--r--xmake/modules/private/action/require/impl/utils/requirekey.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/repository.lua b/xmake/modules/private/action/require/impl/repository.lua
index 68f4ccb6d..001d2ec0a 100644
--- a/xmake/modules/private/action/require/impl/repository.lua
+++ b/xmake/modules/private/action/require/impl/repository.lua
@@ -38,7 +38,7 @@ function _get_packagedir_from_locked_repo(packagename, locked_repo)
break
end
end
- local reponame = hash.uuid(locked_repo.url .. (locked_repo.commit or "")):gsub("%-", ""):lower() .. ".lock"
+ local reponame = hash.hash128(locked_repo.url .. (locked_repo.commit or "")) .. ".lock"
-- get local repodir
local repodir_local
diff --git a/xmake/modules/private/action/require/impl/utils/requirekey.lua b/xmake/modules/private/action/require/impl/utils/requirekey.lua
index 633abb0d1..a8f435cdf 100644
--- a/xmake/modules/private/action/require/impl/utils/requirekey.lua
+++ b/xmake/modules/private/action/require/impl/utils/requirekey.lua
@@ -78,7 +78,7 @@ function main(requireinfo, opt)
if key == "" then
key = "_" -- we need to generate a fixed hash value
end
- return hash.uuid(key):split("-", {plain = true})[1]:lower()
+ return hash.hash32(key)
else
return key
end