summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2023-11-21 18:48:56 +0100
committerGitHub <[email protected]>2023-11-21 18:48:56 +0100
commit61ce13ae09eaaa4bd1f7e8826858495752d7646c (patch)
tree0ea2a0959ae70a0febb70ae12ecf07a5202459a5
parent5f9f4298aa66c0c64e6e8d48a191ef01bf746e74 (diff)
Fix buildhash check with transient deps
-rw-r--r--xmake/core/package/package.lua6
-rw-r--r--xmake/modules/private/action/require/impl/package.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index db34aadc6..babea1717 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -899,10 +899,10 @@ function _instance:manifest_save()
end
-- save deps
- if self:deps() then
+ if self:librarydeps() then
manifest.deps = {}
- for name, dep in pairs(self:deps()) do
- manifest.deps[name] = {
+ for _, dep in ipairs(self:librarydeps()) do
+ manifest.deps[dep:name()] = {
version = dep:version_str(),
buildhash = dep:buildhash()
}
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index cf0df2cea..a06698a02 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -1070,7 +1070,7 @@ function _compatible_with_previous_librarydeps(package, opt)
if manifest and manifest.librarydeps then
local deps = manifest.deps or {}
for _, depname in ipairs(manifest.librarydeps) do
- if strict_compatibility or (package:dep(depname) and package:dep(depname):policy("package.strict_compatibility")) then
+ if strict_compatibility or (package:dep(depname) and package:dep(depname):policy("package.strict_compatibility")) or depinfos_curr[depname] then
local depinfo = deps[depname]
if depinfo and depinfo.buildhash then
depinfos_prev[depname] = depinfo