View Single Post
05/16/14, 03:18 PM   #2
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
LibStub doesn't do a delayed load (which could cause other issues). It doesn't know what the later addons will have when it initializes the library, so it goes with the current highest. That means if the newer version comes later in the load order, it will be loaded as well.

Example, you have AddonA with 1.17, AddonB with 1.14, and AddonC with 1.19

If it goes through AddonA, AddonB, AddonC for load order:
AddonA - first addon, loads 1.17 of the lib.
AddonB - already loaded 1.17 which is newer than 1.14. Do nothing
AddonC - 1.19 is newer, load version 1.19 of the lib

In order for LibStub to behave as you described, it would have to wait until all the addons are loaded before it initializes the libraries. Of course, this means the Addon init functions would have to be pushed back as well.

What are you running into with loading the library twice?
  Reply With Quote