From 0c130e013b5033edff050d96c82937a79c97a258 Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Sun, 24 May 2026 17:05:40 +0200 Subject: [PATCH] chore(libs): sync Ace3 to coa-ace3 d422ad3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aligns the unsuffixed Ace bundle with the rest of the Exiles forks (the -ElvUI namespaced copies are intentionally left alone to keep ElvUI's config UI isolated from any other addon's LibStub registrations). Per-library MINOR moves: CallbackHandler-1.0 6 → 8 AceAddon-3.0 12 → 13 AceTimer-3.0 1017 → 17 (canonical numbering — same C_Timer impl) AceHook-3.0 8 → 9 AceDB-3.0 27 → 33 AceDBOptions-3.0 15 → 15 (unchanged) AceComm-3.0 12 → 14 AceSerializer-3.0 3 → 5 Other Ace libs (Event, Config family, GUI, Locale, Console, Bucket) were already at the canonical target. --- .../Ace3/AceAddon-3.0/AceAddon-3.0.lua | 53 +- .../Ace3/AceBucket-3.0/AceBucket-3.0.lua | 18 +- .../Ace3/AceBucket-3.0/AceBucket-3.0.xml | 2 +- .../Ace3/AceComm-3.0/AceComm-3.0.lua | 115 ++-- .../Ace3/AceComm-3.0/ChatThrottleLib.lua | 362 ++++++++--- .../Ace3/AceConsole-3.0/AceConsole-3.0.lua | 6 +- ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua | 82 ++- .../Ace3/AceHook-3.0/AceHook-3.0.lua | 7 +- .../Ace3/AceLocale-3.0/AceLocale-3.0.lua | 32 +- .../AceSerializer-3.0/AceSerializer-3.0.lua | 32 +- .../Ace3/AceTimer-3.0/AceTimer-3.0.lua | 119 ++-- .../CallbackHandler-1.0.lua | 72 +-- .../CallbackHandler-1.0.xml | 4 + ElvUI/Libraries/Ace3/LibStub/LibStub.lua | 29 +- .../Ace3/AceConfig-3.0/AceConfig-3.0.lua | 8 +- .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 37 +- .../AceConfigDialog-3.0.lua | 579 ++++++++---------- .../AceConfigRegistry-3.0.lua | 37 +- .../AceDBOptions-3.0/AceDBOptions-3.0.lua | 50 +- .../Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.lua | 132 ++-- .../Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.xml | 1 - .../AceGUIContainer-BlizOptionsGroup.lua | 9 +- .../widgets/AceGUIContainer-DropDownGroup.lua | 4 +- .../widgets/AceGUIContainer-Frame.lua | 22 +- .../widgets/AceGUIContainer-InlineGroup.lua | 4 +- .../widgets/AceGUIContainer-ScrollFrame.lua | 2 +- .../widgets/AceGUIContainer-TabGroup.lua | 210 ++++++- .../widgets/AceGUIContainer-TreeGroup.lua | 66 +- .../widgets/AceGUIContainer-Window.lua | 36 +- .../widgets/AceGUIWidget-Button-ElvUI.lua | 179 ------ .../widgets/AceGUIWidget-Button.lua | 6 +- .../widgets/AceGUIWidget-CheckBox.lua | 23 +- .../widgets/AceGUIWidget-ColorPicker.lua | 105 ++-- .../widgets/AceGUIWidget-DropDown-Items.lua | 16 +- .../widgets/AceGUIWidget-DropDown.lua | 64 +- .../widgets/AceGUIWidget-EditBox.lua | 24 +- .../AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 2 +- .../widgets/AceGUIWidget-Keybinding.lua | 16 +- .../AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 16 +- .../widgets/AceGUIWidget-MultiLineEditBox.lua | 37 +- .../widgets/AceGUIWidget-Slider.lua | 38 +- 41 files changed, 1340 insertions(+), 1316 deletions(-) create mode 100644 ElvUI/Libraries/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.xml delete mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Button-ElvUI.lua diff --git a/ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.lua b/ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.lua index 3dbaa1c..00e4e48 100644 --- a/ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.lua +++ b/ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.lua @@ -30,7 +30,7 @@ -- @name AceAddon-3.0.lua -- @release $Id$ -local MAJOR, MINOR = "AceAddon-3.0", 12 +local MAJOR, MINOR = "AceAddon-3.0", 13 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceAddon then return end -- No Upgrade needed. @@ -49,10 +49,6 @@ local select, pairs, next, type, unpack = select, pairs, next, type, unpack local loadstring, assert, error = loadstring, assert, error local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: LibStub, IsLoggedIn, geterrorhandler - --[[ xpcall safecall implementation ]] @@ -62,43 +58,12 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) -- we check to see if the func is passed is actually a function here and don't error when it isn't -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return xpcall(func, errorhandler, ...) end end @@ -632,10 +597,20 @@ function AceAddon:IterateAddonStatus() return pairs(self.statuses) end function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end +-- Blizzard AddOns which can load very early in the loading process and mess with Ace3 addon loading +local BlizzardEarlyLoadAddons = { + Blizzard_DebugTools = true, + Blizzard_TimeManager = true, + Blizzard_BattlefieldMap = true, + Blizzard_MapCanvas = true, + Blizzard_SharedMapDataProviders = true, + Blizzard_CombatLog = true, +} + -- Event Handling local function onEvent(this, event, arg1) - -- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up - if (event == "ADDON_LOADED" and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then + -- 2020-08-28 nevcairiel - ignore the load event of Blizzard addons which occur early in the loading process + if (event == "ADDON_LOADED" and (arg1 == nil or not BlizzardEarlyLoadAddons[arg1])) or event == "PLAYER_LOGIN" then -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration while(#AceAddon.initializequeue > 0) do local addon = tremove(AceAddon.initializequeue, 1) diff --git a/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.lua b/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.lua index c074b5c..d89dcee 100644 --- a/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.lua +++ b/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.lua @@ -34,7 +34,7 @@ -- end -- @class file -- @name AceBucket-3.0.lua --- @release $Id: AceBucket-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $ +-- @release $Id$ local MAJOR, MINOR = "AceBucket-3.0", 4 local AceBucket, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -53,16 +53,12 @@ local type, next, pairs, select = type, next, pairs, select local tonumber, tostring, rawset = tonumber, tostring, rawset local assert, loadstring, error = assert, loadstring, error --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: LibStub, geterrorhandler - local bucketCache = setmetatable({}, {__mode='k'}) --[[ - pcall safecall implementation + xpcall safecall implementation ]] -local pcall = pcall +local xpcall = xpcall local function errorhandler(err) return geterrorhandler()(err) @@ -70,13 +66,7 @@ end local function safecall(func, ...) if func then - local ok, err = pcall(func, ...) - if ok then - return true - else - errorhandler(err) - return false - end + return xpcall(func, errorhandler, ...) end end diff --git a/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.xml b/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.xml index 06ab712..43c6bee 100644 --- a/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.xml +++ b/ElvUI/Libraries/Ace3/AceBucket-3.0/AceBucket-3.0.xml @@ -1,4 +1,4 @@