View Single Post
12/11/18, 03:21 PM   #15
Drakanwulf
 
Drakanwulf's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 50
^^ @Baertram and @sirinsidiator ...

The ability to load add-on .lua files from folder names is what I have always meant when I referred to "embedding" add-on folders within other folders. Otherwise, how could the "##DependsOn:" and "##OptionalDependsOn:"directives work since they use only folder names? These two directives imply an innate ability to find and load .lua add-on files from the manifest files contained within their folder names.

Thinking more about the test results, it appears to me that ESO is attaching the AddOnVersion number to the folder name, and/or its manifest file, and ignoring the .lua files; otherwise, neither the "LoadAddon" folder nor the "LoadAddon.lua" file should have loaded during the TestEmbedding tests. The folder test did not load the add-on file but the filename test did load the file a second time.

I think there is still something not quite correct with the ESO add-on loading logic. If, as sirinsidiator said, the first test ignored the "LoadAddOn" folder because it was not a file name, then that premise invalidates the behavior of the second test which loaded the same "LoadAddon.lua" file twice rather than ignoring or discarding the file.

According to the AddVersion number logic, as I understand it, this is not supposed to occur. The second, and successive, load attempts of any .lua add-on with a current (i.e. equal) AddOnVersion number are supposed to be "ignored" and/or "discarded" because a prior instance of "LoadAddon.lua" is already running.

I should like to run more test variations based on both of your comments and report the findings in the Gitter channel because this discussion has become more of a developmental issue rather than an ESO wish-list topic.

I have placed the "LoadAddon" .lua and manifest files into a GitHub repository. I shall try to wake up early tomorrow, Wednesday, so I can join both of you on the Gitter channel at a more decent hour for all of us.

FYI, @Baertram & sirinsidiator, it was your commentaries in answer to TomTomHotep's questions in the Comments page for the r5 version of the "LibStub" add-on that caused Hawkeye1889 and me to begin work on the "LoadAddon" stub as a template for loading Stand-Alone add-ons. Everything else since then has been caused by our misunderstandings of testing inconsistencies and what was written in the wiki or what we discovered while testing "LoadAddon" or what ESO were reputed to have said about loading .lua add-ons.

("If it isn't written down, it never happened!". This quotation is from Dr. Anne Ryan, wife of Jack Ryan, in response to a question about why she was always making notes. Mr. Ryan is the main protagonist in Tom Clancy's "Patriot Games" and other novels. Remembering this quotation and what it means, is why I am such a stickler about updating the ESOUI wiki accurately and often.).

Last edited by Drakanwulf : 12/11/18 at 04:07 PM. Reason: Syntax and accuracy improvements.