Page 1 of 1

Depends/dependencies for mods feature request

Posted: Sun May 17, 2015 08:18
by dgm5555
I'm just wondering if it would be possible to improve the dependency specification for MT.
Currently if you download a mod there is no way of knowing which modpack it refers to as a dependency.
1. It would be really helpful if the file could optionally include a link to the repo and/or the forum post (eg in the following I have no way of knowing where to find bees)
2. When selecting the title of a modpack, it would be helpful if all dependencies within it were listed, rather than having to go into each sub-mod
3. When enabling a mod, it would be great if the dependencies were shown in different colours
eg enabled (green?), installed in mods directory but not enabled (amber?), and not installed (red?)
4. Even better would be buttons which could be clicked to enable all dependencies, or only individual one (and for bonus marks one to download automatically from the repo)

BTW is it possible to change colour for the mods menu list - my activated modpack colour is so dark I can't see it (see the following home decor title for example):
Image

Re: Depends/dependencies for mods feature request

Posted: Wed May 20, 2015 06:52
by Gael de Sailly
dgm5555 wrote:1. It would be really helpful if the file could optionally include a link to the repo and/or the forum post (eg in the following I have no way of knowing where to find bees)
A clickable link or just an address ? The second case would be easy. We can imagine a file, in the mod directory, for example "mod.conf", on which we can put some data like mod description, repository address, creator(s), etc.
dgm5555 wrote:2. When selecting the title of a modpack, it would be helpful if all dependencies within it were listed, rather than having to go into each sub-mod
Possible. We don't need anything more in the modpack to do that. Just list the depends of every mod in the modpack, and then clean the list by removing duplicates and mods that are in the modpack.
dgm5555 wrote:3. When enabling a mod, it would be great if the dependencies were shown in different colours
eg enabled (green?), installed in mods directory but not enabled (amber?), and not installed (red?)
Possible too. We just need the motivation to code it. I like this idea.
dgm5555 wrote:4. Even better would be buttons which could be clicked to enable all dependencies, or only individual one (and for bonus marks one to download automatically from the repo)
Idem. Except the automatic download that is not perfect (did you try to install mods from the "mods" tab of the mainmenu ?), all is "easily" feasible.

I can code it because it only imply the builtin folder that is in LUA. No guarantee to be taken seriously.
dgm5555 wrote:BTW is it possible to change colour for the mods menu list - my activated modpack colour is so dark I can't see it
PR #2712

Re: Depends/dependencies for mods feature request

Posted: Fri Jun 05, 2015 12:07
by technomancy
I've wondered about this myself, having worked on other dependency management software. (Ruby's and Clojure's specifically) Having to track down the dependencies is OK for a mod or two, but for more complicated stuff it gets super annoying.

There's lots of room to get fancy, (for instance, I think depends.txt should probably be a JSON file) but I think a very simple first step would be to change it so that Minetest only looks at the first token of each line in depends.txt, split by spaces. That way you could include a URL after the mod name. This could either be used by a human who downloads and extracts the archive at that URL in the appropriate directory, or by a 3rd-party tool outside Minetest. I like the idea of implementing it in a 3rd-party tool because if the specification loosens up a bit, it would allow the dependency-tracking scheme to evolve outside the release cycle of Minetest itself, and once it stabilizes it could be submitted as a candidate for eventual inclusion.

Re: Depends/dependencies for mods feature request

Posted: Wed Jun 10, 2015 10:42
by Wuzzy
No. 3 is already done since over 3 months, but it is still not merged for an unknown reason.
https://github.com/minetest/minetest/pull/2424

Re: Depends/dependencies for mods feature request

Posted: Sat Jun 13, 2015 16:20
by Sokomine
technomancy wrote: There's lots of room to get fancy, (for instance, I think depends.txt should probably be a JSON file) but I think a very simple first step would be to change it so that Minetest only looks at the first token of each line in depends.txt, split by spaces. That way you could include a URL after the mod name. This could either be used by a human who downloads and extracts the archive at that URL in the appropriate directory, or by a 3rd-party tool outside Minetest. I like the idea of implementing it in a 3rd-party tool because if the specification loosens up a bit, it would allow the dependency-tracking scheme to evolve outside the release cycle of Minetest itself, and once it stabilizes it could be submitted as a candidate for eventual inclusion.
Sounds like a very good idea. We tend to provide links to other mods which our mods depend on in the introductory forum thread, but that might not always be at hand when someone wants to install a mod.