From 61ce13ae09eaaa4bd1f7e8826858495752d7646c Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Tue, 21 Nov 2023 18:48:56 +0100 Subject: Fix buildhash check with transient deps --- xmake/core/package/package.lua | 6 +++--- xmake/modules/private/action/require/impl/package.lua | 2 +- 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 -- cgit v1.3.1