vendethiel / GladiusEx

13 stars 19 forks source link

Missing libraries [1.1.1] #17

Closed ghost closed 5 years ago

ghost commented 5 years ago

It looks like there is a bit of a mismatch between the paths defined in your code and the paths you have packaged in your libs folder.

Couldn't open GladiusEx\libs\LibSpecRoster-1.0\lib.xml Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibGroupInSpecT-1.1-90\lib.xml Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibFunctional-1.0-2\lib.xml

Cross-posted from https://www.wowace.com/projects/gladiusex/issues/48 since it seems GitHub issues might be your preferred issue tracker.

Verified with just GladiusEx, Buggrabber & Bugsack.

vendethiel commented 5 years ago

Are you running disembedded by any chance?

ghost commented 5 years ago

Disembedded? I'm not sure what you mean. If you mean Twitch (Curse) Client's install libraries separately option, no I am not. Only using embedded libraries.

ghost commented 5 years ago

For clarity, even downloading the zip manually from curseforge, this is the contents of your libs folder.

image of zip contents

GladiusEx\libs\LibCooldownTracker-1.0-10\ doesn't exist Nor does GladiusEx\libs\LibSpecRoster-1.0\

vendethiel commented 5 years ago

Well LibSpecRoster is an issue that didn't exist before just because WoW didn't error when loading non-existing fields. The dep was removed in 2015 (7f0226905fafe9d7981661a4e6d05e400688401f)

vendethiel commented 5 years ago

I don't see where "LibCooldownTracker-1.0-10" comes from. It doesn't exist in this repo. Even with the zip downloaded from curseforge, I can't find it.

ghost commented 5 years ago

I'm confused as well. I am looking at your embeds.xml and don't see why the game engine is trying to look for those last two. (As you say, LibSpecRoster is an easy one.)

I deleted the savedvariables to see if that was messing with things, but no change. Did a clean reinstall and still get those three errors. Only addons enabled are GladiusEx, Buggrabber, and Bugsack.

ghost commented 5 years ago

I think I might have spotted it. Have a look in GladiusEx\libs\LibCooldownTracker-1.0\lib.xml

vendethiel commented 5 years ago

Ah, it uses the non-forked version of LibGroupInSpecT. I think it might be a problem...

vendethiel commented 5 years ago

I should probably rename my fork TBH.

vendethiel commented 5 years ago
6x Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibGroupInSpecT-1.1-86\lib.xml

6x Couldn't open GladiusEx\libs\LibSpecRoster-1.0\lib.xml

8x Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibFunctional-1.0-2\lib.xml
vendethiel commented 5 years ago

10x Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibGroupInSpecT-1.1-90\lib.xml

10x Couldn't open GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibFunctional-1.0-2\lib.xml

slaren commented 5 years ago

The \<Include> lines in lib.xml of LCT probably should be covered by a \!--@no-lib-strip@--\ and \!--@end-no-lib-strip@--\ tags.

slaren commented 5 years ago

Actually, I would just remove these lines and rely on the .toc file to load the libraries when running unembedded.

vendethiel commented 5 years ago

I'm still a noob when it comes to packaging ☹️. I haven't find a similar case (addon has dep A => dep A has deps itself) in my folder.

if the lib is never to be used on its own, does it make sense to just remove these lines? I don't know how .toc file loading works, does it guarantee correct loading order?

@EnmaPlays Could you try to remove these lines? I mean remove the two <Include... lines in the file lib.xml in the folder Interface/Addons/GladiusEx/libs/LibCooldownTracker-1.0.

slaren commented 5 years ago

I think the main idea is that if the library is being embedded, then it is the responsibility of the addon embedding it to make sure that all the dependencies are loaded first. The addon uses the lib.xml file of the library (after loading all of its dependencies, by adding their lib.xml files before), which should only include its own files and not its dependencies. The lib.xml is just a shortcut so that addons dont have to manually load every .lua file of the library, they just load the lib.xml which includes all the .lua files of the library.

However, if the library is being installed standalone, then it needs to be able to load its dependencies. This is done by adding them to the .toc file. The #OptionalDeps tag is used to guarantee the correct loading order when running with libs unembedded.

Note that WoW only loads the .toc file of each addon, but not of the embedded libraries. As far as WoW knows, the embedded libraries are just part of the addon itself. WoW only loads the .toc with the same name than the addon directory.

slaren commented 5 years ago

Also, note that the dependencies of the embedded libraries should be added as embedded libraries of the addon itself. Thus, all the required libraries, including the dependencies of other libraries, should be in the libs directory. You should never have libraries embedded within the embedded libraries, ie. GladiusEx\libs\LibCooldownTracker-1.0-10\libs\LibFunctional-1.0-2\lib.xml should not happen.

akeijser commented 5 years ago

Removing those includes C:\Program Files (x86)\World of Warcraft\Interface\AddOns\GladiusEx\libs\LibCooldownTracker-1.0\lib.xml made sure I dont get the error anymore.

Have not seen issues in arena's so far. Thanks