Skip to content

Commit

Permalink
If we are loading a library that depends on a separate library, we ne…
Browse files Browse the repository at this point in the history
…ed to verify that separate library exists prior to telling LibStub to create our library. This resolves addons with broken library setups affecting addons with working library setups.
  • Loading branch information
funkydude committed Aug 12, 2017
1 parent 4157754 commit e4f8470
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
7 changes: 3 additions & 4 deletions AceComm-3.0/AceComm-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ TODO: Time out old data rotting around from dead senders? Not a HUGE deal since
]]

local MAJOR, MINOR = "AceComm-3.0", 9
local CallbackHandler = LibStub("CallbackHandler-1.0")
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")

local MAJOR, MINOR = "AceComm-3.0", 9
local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)

if not AceComm then return end

local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")

-- Lua APIs
local type, next, pairs, tostring = type, next, pairs, tostring
local strsub, strfind = string.sub, string.find
Expand Down
5 changes: 3 additions & 2 deletions AceConfig-3.0/AceConfig-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ Very light wrapper library that combines all the AceConfig subcomponents into on
]]

local cfgreg = LibStub("AceConfigRegistry-3.0")
local cfgcmd = LibStub("AceConfigCmd-3.0")

local MAJOR, MINOR = "AceConfig-3.0", 2
local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)

if not AceConfig then return end

local cfgreg = LibStub("AceConfigRegistry-3.0")
local cfgcmd = LibStub("AceConfigCmd-3.0")
--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)

Expand Down
2 changes: 1 addition & 1 deletion AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ REQUIRES: AceConsole-3.0 for command registration (loaded on demand)

-- TODO: plugin args

local cfgreg = LibStub("AceConfigRegistry-3.0")

local MAJOR, MINOR = "AceConfigCmd-3.0", 13
local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
Expand All @@ -23,7 +24,6 @@ if not AceConfigCmd then return end
AceConfigCmd.commands = AceConfigCmd.commands or {}
local commands = AceConfigCmd.commands

local cfgreg = LibStub("AceConfigRegistry-3.0")
local AceConsole -- LoD
local AceConsoleName = "AceConsole-3.0"

Expand Down
6 changes: 3 additions & 3 deletions AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
-- @release $Id$

local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")

local MAJOR, MINOR = "AceConfigDialog-3.0", 61
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)

Expand All @@ -17,9 +20,6 @@ AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {}
AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}

local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")

-- Lua APIs
local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort
local strmatch, format = string.match, string.format
Expand Down
4 changes: 2 additions & 2 deletions AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id$
local CallbackHandler = LibStub("CallbackHandler-1.0")

local MAJOR, MINOR = "AceConfigRegistry-3.0", 16
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)

if not AceConfigRegistry then return end

AceConfigRegistry.tables = AceConfigRegistry.tables or {}

local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")

if not AceConfigRegistry.callbacks then
AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry)
end
Expand Down
4 changes: 2 additions & 2 deletions AceEvent-3.0/AceEvent-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
-- @class file
-- @name AceEvent-3.0
-- @release $Id$
local CallbackHandler = LibStub("CallbackHandler-1.0")

local MAJOR, MINOR = "AceEvent-3.0", 3
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)

Expand All @@ -18,8 +20,6 @@ if not AceEvent then return end
-- Lua APIs
local pairs = pairs

local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")

AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame
AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib

Expand Down

0 comments on commit e4f8470

Please sign in to comment.