View Single Post
05/11/19, 09:11 AM   #22
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,966
LibPotionBuff will be changed, already got a beta version for tests here if you want to try it out:
LibPotionBuff without LibStub

And the others will follow, I'm pretty sure. So I will definately remove LibStub from my libraries. It takes some time but e.g. LibFilters needed a new version for this (3.0) and 2.0 should be replaced with 3.0 soon!
I guess you should start to modify your addons to support both ways.
Either the global variable or LibStub like this:

Lua Code:
  1. local lpb = LibPotionBuff
  2. if lpb == nil and LibStub then lpb = LibStub("LibPotionBuff") end

In your addon#s manifest ttx be sure to add LibPotionBuff to the ##DependsOn: entry:

Code:
##DependsOn: LibPotionBuff
And remove LiBStub from the DependsOn and OptionalDependsOn as this should be handled in the library's own txt file (if installed as stadnalone and NOT included in your addon zip file) on it's own via LibPotionBuff.txt -> ##DependsOn: LibStub or even not anymore for the new version.

If you have the libraries included into your addon's zip archive you should start to remove them, or be sure to support them properly so either users containing older versions of your addon WITH LibStub libraries are able to use it AND new versions without it as well (as shown above in the example).
  Reply With Quote