Thread Tools Display Modes
07/06/14, 05:13 AM   #1
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
DependsOn in Manifest not working when addon is out of date

If you use DependsOn in your manifest file, and the addon you depend on is marked out of date, your addon will still load.

Looks imo a bug. Anyone else encountered this behavior before ?
  Reply With Quote
07/06/14, 05:49 AM   #2
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Are you certain it is actually loaded/excuted? The checkbox only implies an intention to execute it.
Easiest way to check that is BugEater+PreInitDebug+OptionalDependency+d() in the .lua file.

I once had an issue where I was missing a Dependency. Dependant Addon was not loaded and for some reason the name of the dependency did not appear either ("Depends on: ").

Could it be that you misswrote in the Manifest?
Like the XML, errors while processing the manifest are silently ignored. It could help if you post the manifest.
  Reply With Quote
07/06/14, 06:15 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
I have tested how it works and even if addon manager (on character selection screen) does not show dependency error, addon is not loaded.

If you are talking about your ATLAS Logger, you have typo in the manifest:
Code:
## DependsOn : ATLAS
This command is not recognized because of space between DependsOn and the colon.

Also addon name is case sensitive, so you should use:
Code:
## DependsOn: Atlas
  Reply With Quote
07/06/14, 06:29 AM   #4
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
Zzzz it was working fine before but somehow a space was added so it didn't work anymore
Lua Code:
  1. Wrong
  2. ##DependsOn : yourAddon
  3. Right
  4. ##DependsOn: yourAddon

Last edited by CrazyDutchGuy : 07/06/14 at 06:31 AM.
  Reply With Quote
07/06/14, 06:30 AM   #5
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
hmm the case sensitivity i didn't notice even. That resolves all the problems.
  Reply With Quote
07/06/14, 07:08 AM   #6
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
Took the opportunity to update the wiki http://wiki.esoui.com/Addon_manifest_(.txt)_format
  Reply With Quote
07/06/14, 01:00 PM   #7
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Wait, the list is space seperated?
Then I am wondering if my optional dependecies has ever been working like this:
Code:
## OptionalDependsOn: LibStub, timer, LibAddonMenu-2.0, LAM-1to2-Interface, libDebug, BugEater
If they are ignoring comma's it would propably work out. If not then this line never did anything (but the only one that really matered was BugEater anyway).
  Reply With Quote
07/06/14, 01:17 PM   #8
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by zgrssd View Post
Wait, the list is space seperated?
Then I am wondering if my optional dependecies has ever been working like this:
Code:
## OptionalDependsOn: LibStub, timer, LibAddonMenu-2.0, LAM-1to2-Interface, libDebug, BugEater
If they are ignoring comma's it would propably work out. If not then this line never did anything (but the only one that really matered was BugEater anyway).
To be honest I have never tried to separate dependencies with commas, but try to separate saved variables with commas and you will see what happens.
http://www.esoui.com/downloads/info5....html#comments
  Reply With Quote
07/06/14, 04:07 PM   #9
farangkao
 
farangkao's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 59
Originally Posted by zgrssd View Post
Wait, the list is space seperated?
Then I am wondering if my optional dependecies has ever been working like this:
Code:
## OptionalDependsOn: LibStub, timer, LibAddonMenu-2.0, LAM-1to2-Interface, libDebug, BugEater
If they are ignoring comma's it would propably work out. If not then this line never did anything (but the only one that really matered was BugEater anyway).
The Answer is simple, their code checks for a string that starts with "## OptionalDependsOn:" ,the rest of the string is then processes accordingly, the spaces don't matter then.
  Reply With Quote
07/07/14, 04:51 AM   #10
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by farangkao View Post
The Answer is simple, their code checks for a string that starts with "## OptionalDependsOn:" ,the rest of the string is then processes accordingly, the spaces don't matter then.
Since according to the wiki it is a Space seperated list, the spaces do matter.
At worst it might actually count the comma to the addon name, so it was trying to load the addon "LibStub," instead of "LibStub" - wich it would never find.

Luckily the only one that really mattered ws BugEater/LibDebug because those are needed for the error output. And since they always were at the end of the list, thier names were propably parsed correctly.
The rest was only thier for minor efficiency reasons (stand alone copies more likely up to date, so better to load them before embedded copies are loaded so LibStub get's the highest first).
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » DependsOn in Manifest not working when addon is out of date


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off