View Single Post
12/07/18, 05:32 AM   #8
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Originally Posted by Drakanwulf View Post
Exactly, and my suggestion was meant to promote actively not loading duplicates, which ZOS and ESO can't do, but add-on developers can and should do... but that's just my opinion. Of course, the backlash from the user community would affect some add-on developers more than others, if one were to follow that path.
I feel like I am talking against a wall again... You still don't seem to understand that ESO already actively not loads duplicates. When you have version 1 and version 2 of "SomeAddon" in different subfolders of your addon folder, only SomeAddon v2 is loaded by the game. There is no need for any code written by the addon author to prevent v1 from loading, since the game already takes care of that. That's exactly the reason why we need to get rid of LibStub, because LibStub is not capable of doing that.

Originally Posted by Drakanwulf View Post
Right now, it is impossible to "legally" retrieve the AddOnVersion for any add-on. You have to "guess" at values that you cannot get. An optimal solution, in my view, would be for ESO to provide the current AddOnVersion and the manifest AddOnVersion to the add-on developer so they could make their decisions based on fact. And that was my point!
It is true that you cannot retrieve the value from the manifest file, but you can simply copy the number you put in the manifest into any of your Lua files and you have EXACTLY the number you want with no guessing involved, since the game makes sure that only one version of your addon is loaded when you specify the AddOnVersion in the manifest. I repeat again, there is no uncertainty that the number you have in your code is the same as the one in the manifest when you take care that you update it in both the txt and lua file.