From a79cf74f920c088528d66a67a59b3d8eaa1d4f7a Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 14 Aug 2026 23:28:20 +0800 Subject: autofetch addons --- xmake/core/package/addon.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xmake/core/package/addon.lua') diff --git a/xmake/core/package/addon.lua b/xmake/core/package/addon.lua index 586a3ea15..6d56205fd 100644 --- a/xmake/core/package/addon.lua +++ b/xmake/core/package/addon.lua @@ -656,6 +656,17 @@ function addon.remove(name, opt) return true end +-- reload the addons registry and the caches which are built from it +-- +-- @note we need it if the addons have been installed by another process, +-- e.g. the addons which a project declares, @see core/project/project.lua +-- +function addon.reload() + addon._ADDONS = nil + addon._MANIFESTS = nil + addon._GLOBALMODULES = nil +end + -- rescan the install directory and rebuild the registry -- -- it's only used to repair the registry file, e.g. the user removed some addon directories manually -- cgit v1.3.1