[3.0.2 bug?] LoD addons not loading

#0 - Oct. 10, 2008, 6:52 a.m.
Blizzard Post
An addon that is marked LoD with

## LoadOnDemand: 1

in the TOC will not load if another addon has the LoD addon listed in its OptionalDeps. The only way to force a LoD addon to load is via the use of LoadAddOn(). This severely breaks disembedding addon libraries, especially since many libraries depend on other libraries.

As a minimal test case, I've compiled this zip:

http://pachome2.pacific.net.sg/~xinhuan/wow/LoadOnDemandProblem.zip

which consists of 2 addons, AddOnA and AddOnB.

---------------
AddonA.toc:
## Interface: 30000
## Title: AddonA Test
## Notes: AddonA Test
## LoadOnDemand: 1

AddonA.lua
---------------
AddonA.lua:
ChatFrame1:AddMessage("Loading AddonA")
---------------
AddonB.toc:
## Interface: 30000
## Title: AddonB Test
## Notes: AddonB Test
## OptionalDeps: AddonA

AddonB.lua
---------------
AddonB.lua:
ChatFrame1:AddMessage("Loading AddonB")
---------------

If you run these 2 addons, you will see that AddonB will load, AddonA does not. If you then edit AddonA.toc and change its LoD status from 1 to 0 making it not LoD and load WoW again, both A and B will then load as expected. (This can be verified on build 9061)

Currently on live realms, whether AddonA is LoD or not, because AddonB lists it in its OptDeps, AddOnA will load.

Is this a bug or design change? I am currently forced to put LoadAddOn() at the start of my addons to force load all used disembedded libraries, and insert LoadAddOn() statements in disembedded libs that use other LoD libs.
#5 - Oct. 13, 2008, 7:07 p.m.
Blizzard Post
Thanks for the heads up, we're looking into this!
#8 - Oct. 14, 2008, 2:18 a.m.
Blizzard Post
This is fixed for 3.0.3!