That doesn't necessarily imply that it isn't a bug. I fail to understand the logic behind this change anyway and I'd much rather Blizzard dealt with it, before WoW 3.0 goes live, rather than having to resort to workarounds that at the end of the day will cause more harm (and possible drama) than good.
3.0.2 is frozen already, more or less anyway. I doubt they can do much for the release next week. Especially with all the devs having fun at BlizzCon now..
local orig_LibStub_GetLibrary = LibStub.GetLibrary
function LibStub:GetLibrary(major, silent)
local lib, minor = orig_LibStub_GetLibrary(self, major, true)
if lib then
return lib, minor
end
if IsAddOnLoadOnDemand(major) and not IsAddOnLoaded(major) then
LoadAddOn(major)
else
local libMeta = "X-Library-"..major
for i = 1, GetNumAddOns() do
if IsAddOnLoadOnDemand(i) and not IsAddOnLoaded(i) and GetAddOnMetadata(i, libMeta) then
LoadAddOn(GetAddonInfo(i))
break
end
end
end
return orig_LibStub_GetLibrary(self, major, silent)
end
getmetatable(LibStub).__call = LibStub.GetLibrary
Then I replaced "## LoadOnDemand: 1" by "## LoadManagers: !!LibraryLoader" (and some "X-Library-XXX:" for some unpacked libraries) in each LibStub'ed library toc files et voila !
Well it still can't guarantee to load before _any_ other addon, Load Order might be different on Non-Windows systems.
And i cannot add the X-Library tags programatically with a script to the .tocs that need it..
If we would've considered something like LibraryLoader before today, we might've made it work in all due time. Maybe we can still do that anyway, but not for 3.0.2 release.
I'll extend my script to be able to easily revert the LoadOnDemand change if Blizzard comes forward and fixes the "bug" in the game, so we could go back if its fixed.
That doesn't necessarily imply that it isn't a bug. I fail to understand the logic behind this change anyway and I'd much rather Blizzard dealt with it, before WoW 3.0 goes live, rather than having to resort to workarounds that at the end of the day will cause more harm (and possible drama) than good.
Well, I've got my beta key almost three months ago, and LoD addons (especially libraries) didn't load since then in the beta - I'm quite sure it's planned. Too bad that the UI Panel was yesterday on Blizzcon, somebody could ask the devs about that change...
Like i said, i extended my script to easily change the TOCs again. I keep a list of all TOCs that i modify, and thus can easily add the LoadManager command to them if we consider this stable, and Blizzard tells us its intended behaviour.
Or i can re-add the LoD if Blizz fixes it.
For now, i'm still kinda drawn to remove the LoD. I tested the solution, and it works in the majority of cases. Only very few addons that don't OptDep the Libs but rely on AceLibrary to load them (really only very few did that) would need an additional change.
Hacking LibStub to run LoadAddOn() when called with non loaded libraries WILL BREAK ADDONS that use AceAddon-3.0 and AceDB-3.0. I don't even see this being a viable temp fix and think the idea should just be abandoned.
Well, I've got my beta key almost three months ago, and LoD addons (especially libraries) didn't load since then in the beta - I'm quite sure it's planned. Too bad that the UI Panel was yesterday on Blizzcon, somebody could ask the devs about that change...
I know Ydrisselle, I had the same experience, still I want to believe that this is something that was simply overlooked.
So what's it going to be Nev ? The way I understand it, touching LibStub is out of the question (personally agree with that), so I guess making all libraries non-LoD temporarily, right ?
Hacking LibStub to run LoadAddOn() when called with non loaded libraries WILL BREAK ADDONS that use AceAddon-3.0 and AceDB-3.0. I don't even see this being a viable temp fix and think the idea should just be abandoned.
Thanks for reminding me, i forgot about those load issues. So we're back to not viable to hack up LibStub
Only very few addons that don't OptDep the Libs but rely on AceLibrary to load them (really only very few did that) would need an additional change.
I thought you didn't change the AceLibraries. In a disembedded environnment, Ace2 should be standalone and optdep'd first by the Ace2 addon, so AceLibrary is loaded and can load any other AceLibrary.
I mean: AceLibraries are fine on 3.0. If it ain't broken, why fix it ?
LibBabble-Spell-3.0
- Dead LibDebugLog-1.0
- WTF is this? LibDruidMana-1.0
- Dead due to 3.0 API change LibGUIDRegistry-0.1
- Dead (its mine anyway, nothing but Omen2 uses it and Omen2 is dead) LibInventory-2.1
- WTF is this? LibLogger-1.0
- WTF is this? LibMobHealth-4.0
- Dead due to 3.0 API change LibSharedMedia-2.0
- Dead ProximityLib
- Dead? Isn't this from like pre 2.0?
I removed the Dead libs from my list and posted a message on their description page how they are deprecated now.
For DruidMana and MobHealth its rather trivial to update the addon to use the new API, so Devs shoud manage pretty fast.
LibSharedMedia was only a matter of changing the version number from 2.0 to 3.0 because the API is compatible (you only need to add handlers for the callbacks, but if you used 2.0, chances are you don't even have any callbacks)
LibBabble-Spell is not as trivial and needs some more research, but its still worth it to dump it :)
Hrmf... Moreover, people was instructed not to optdep it : http://www.wowwiki.com/LibStub#AddOn
!!LibraryLoader/!!LibraryLoader.toc :
!!LibraryLoader/LibraryLoader.lua :
Then I replaced "## LoadOnDemand: 1" by "## LoadManagers: !!LibraryLoader" (and some "X-Library-XXX:" for some unpacked libraries) in each LibStub'ed library toc files et voila !
And i cannot add the X-Library tags programatically with a script to the .tocs that need it..
If we would've considered something like LibraryLoader before today, we might've made it work in all due time. Maybe we can still do that anyway, but not for 3.0.2 release.
I'll extend my script to be able to easily revert the LoadOnDemand change if Blizzard comes forward and fixes the "bug" in the game, so we could go back if its fixed.
Well, I've got my beta key almost three months ago, and LoD addons (especially libraries) didn't load since then in the beta - I'm quite sure it's planned. Too bad that the UI Panel was yesterday on Blizzcon, somebody could ask the devs about that change...
That's why I called it "hackish".
Nope but if you can have a list of the libs, we could find them. Few libraries need this.
Or i can re-add the LoD if Blizz fixes it.
For now, i'm still kinda drawn to remove the LoD. I tested the solution, and it works in the majority of cases. Only very few addons that don't OptDep the Libs but rely on AceLibrary to load them (really only very few did that) would need an additional change.
Lets just hope for a quick blue response ;)
I know Ydrisselle, I had the same experience, still I want to believe that this is something that was simply overlooked.
So what's it going to be Nev ? The way I understand it, touching LibStub is out of the question (personally agree with that), so I guess making all libraries non-LoD temporarily, right ?
Thanks for reminding me, i forgot about those load issues. So we're back to not viable to hack up LibStub
I thought you didn't change the AceLibraries. In a disembedded environnment, Ace2 should be standalone and optdep'd first by the Ace2 addon, so AceLibrary is loaded and can load any other AceLibrary.
I mean: AceLibraries are fine on 3.0. If it ain't broken, why fix it ?
List of .tocs that need the fix, imho:
Its only all the new LibStub libs and some very old stuff that didnt even use Ace2 yet, lol :)
- Dead
LibDebugLog-1.0
- WTF is this?
LibDruidMana-1.0
- Dead due to 3.0 API change
LibGUIDRegistry-0.1
- Dead (its mine anyway, nothing but Omen2 uses it and Omen2 is dead)
LibInventory-2.1
- WTF is this?
LibLogger-1.0
- WTF is this?
LibMobHealth-4.0
- Dead due to 3.0 API change
LibSharedMedia-2.0
- Dead
ProximityLib
- Dead? Isn't this from like pre 2.0?
That's not the question and the answers are in the project pages. LibDebugLog-1.0 is mine, BTW.
For DruidMana and MobHealth its rather trivial to update the addon to use the new API, so Devs shoud manage pretty fast.
LibSharedMedia was only a matter of changing the version number from 2.0 to 3.0 because the API is compatible (you only need to add handlers for the callbacks, but if you used 2.0, chances are you don't even have any callbacks)
LibBabble-Spell is not as trivial and needs some more research, but its still worth it to dump it :)
L["<English Name>"] = (GetSpellInfo(####))
.. at most...
That should hopefully fix most of the issues coming with 3.0