View Single Post
12/05/18, 03:23 PM   #3
Drakanwulf
 
Drakanwulf's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 50
How about a "GetAddOnVersion()" call?

sirinsidiator has already brought up "AddOnVersion" under his "Which version does the addon specify?" paragraph. My request is but another complaint about the same subject.

ESO already has an API call to "GetAPIVersion()" to return the current ESO API Version, so how difficult could it be to add an API call to "GetAddOnVersion( "AddOnName" )" to return the current "addonversion" number (or nil whenever the AddOnVersion number cannot be found) for the "AddOnName" in question?

This would let ESO tell developers what the current version of their loaded add-on is. For example, add-on developers could use the return value to detect and deny duplicate or "out-of-date" add-on load requests caused by unnecessary add-on folders that have been embedded in poor (or bad or lazy) add-on packaging.

Right now, for example, the LibStub add-on, which many library add-ons use to bootstrap their loads, has to "guess" at what any add-on's latest version number is because ESO provides no internal reference to those values. Add-on developers know when the ESO API has been changed because they can invoke "GetAPIVersion()" to get the latest version. I think we should be able to get similar version information about any loaded add-on.