Page 1 of 2

Limit the number of a direct dependencies per mod

Posted: Sun Jun 30, 2024 7:26 am
by Merssedes
I suggest to add the limit for the number of a dependencies that mod can directly reference.

Suggested limit: 100.

For those who really need to have more dependencies, they can add intermediate mods to group them.

Reasoning: I don't currently see valid use case for mods like this:
* https://mods.factorio.com/mod/all-the-modportal
* https://mods.factorio.com/mod/BestMods
* https://mods.factorio.com/mod/better
* https://mods.factorio.com/mod/better_start
* https://mods.factorio.com/mod/osm-lib-postprocess
* https://mods.factorio.com/mod/sparkletr ... mers-final
* https://mods.factorio.com/mod/zzzzzzzzz ... zzzzzzzzzz

Re: Limit the number of a direct dependencies per mod

Posted: Sun Jun 30, 2024 9:16 am
by jodokus31
I also stumbled over those mods. Not really sure, what to think about them.
The "all-the-modportal" sounds a bit like a leeching tool to host/store the mods somewhere else.

Re: Limit the number of a direct dependencies per mod

Posted: Sun Jun 30, 2024 9:31 am
by Pi-C
Yes! I've noticed those mods as well. They are quite a nuisance as they show up in all reverse dependencies. I want to know what mods link back to mine, so that I can check whether I need to add compatibility code. But such mods that depend on all the mods on the mod portal just make that useless.

Moreover, the dependencies of those mods don't really make sense as they depend on really everything, even on mods that haven't been updated to Factorio 1.1 (example).

Re: Limit the number of a direct dependencies per mod

Posted: Mon Jul 08, 2024 5:48 am
by curiosity
Merssedes wrote: Sun Jun 30, 2024 7:26 am I suggest to add the limit for the number of a dependencies that mod can directly reference.

Suggested limit: 100.

For those who really need to have more dependencies, they can add intermediate mods to group them.

Reasoning: I don't currently see valid use case for mods like this:
* https://mods.factorio.com/mod/all-the-modportal
* ---https://mods.factorio.com/mod/BestMods---
* https://mods.factorio.com/mod/better
* https://mods.factorio.com/mod/better_start
* https://mods.factorio.com/mod/osm-lib-postprocess
* https://mods.factorio.com/mod/sparkletr ... mers-final
* https://mods.factorio.com/mod/zzzzzzzzz ... zzzzzzzzzz
Then what is the point of your limitation? If anything, it will make those mods even more spammy.

Re: Limit the number of a direct dependencies per mod

Posted: Mon Jul 08, 2024 6:06 pm
by Merssedes
curiosity wrote: Mon Jul 08, 2024 5:48 am
Merssedes wrote: Sun Jun 30, 2024 7:26 am I suggest to add the limit for the number of a dependencies that mod can directly reference.

Suggested limit: 100.

For those who really need to have more dependencies, they can add intermediate mods to group them.

Reasoning: I don't currently see valid use case for mods like this:
<...>
Then what is the point of your limitation? If anything, it will make those mods even more spammy.
The point is that it will not be possible to make simply copying list of all mods on mod portal, it will require more work to make and even more to automate. So legitimate mods that actually require more dependencies will do it manually once. Mods that made just to add all mod portal as dependencies, will require actual work to do. Excpetially considering that for more than 9900 dependencies (if limit will be 100) it will require at least 2 levels of dependency merging.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 12:51 am
by curiosity
Merssedes wrote: Mon Jul 08, 2024 6:06 pm The point is that it will not be possible to make simply copying list of all mods on mod portal, it will require more work to make and even more to automate. So legitimate mods that actually require more dependencies will do it manually once. Mods that made just to add all mod portal as dependencies, will require actual work to do. Excpetially considering that for more than 9900 dependencies (if limit will be 100) it will require at least 2 levels of dependency merging.
The work of getting the list of all mods is significantly greater than the trivial work of dividing them up. It will stop no one.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 5:44 am
by Merssedes
curiosity wrote: Tue Jul 09, 2024 12:51 am
Merssedes wrote: Mon Jul 08, 2024 6:06 pm The point is that it will not be possible to make simply copying list of all mods on mod portal, it will require more work to make and even more to automate. So legitimate mods that actually require more dependencies will do it manually once. Mods that made just to add all mod portal as dependencies, will require actual work to do. Excpetially considering that for more than 9900 dependencies (if limit will be 100) it will require at least 2 levels of dependency merging.
The work of getting the list of all mods is significantly greater than the trivial work of dividing them up. It will stop no one.
No?..
https://mods.factorio.com/api/mods?page_size=20000

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 7:27 am
by curiosity
You still need to parse the result. And I didn't say it was a lot of work, I only said it was more work than dividing them up.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 8:56 am
by Qon
If you read about https://mods.factorio.com/mod/sparkletr ... mers-final you see why these other mods are needed. Apparently they can be used to improve performance of other mods! :) :idea:

Do we prefer a handful of these mods and people depending on the ones already existing, or do we really want hundreds of them by introducing a limit of 100? I think it's better as it is compared to the alternative.
jodokus31 wrote: Sun Jun 30, 2024 9:16 am I also stumbled over those mods. Not really sure, what to think about them.
The "all-the-modportal" sounds a bit like a leeching tool to host/store the mods somewhere else.
They are used by other mods "legitimately" as dependencies to ensure they load last.
curiosity wrote: Tue Jul 09, 2024 7:27 am
You still need to parse the result. And I didn't say it was a lot of work, I only said it was more work than dividing them up.
All reasonable programming languages that might receive JSON data can parse it. Its just a call to JSON.parse(), it's like the most trivial thing.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 10:56 am
by Nidan
Qon wrote: Tue Jul 09, 2024 8:56 am If you read about https://mods.factorio.com/mod/sparkletr ... mers-final you see why these other mods are needed. Apparently they can be used to improve performance of other mods! :) :idea:

Do we prefer a handful of these mods and people depending on the ones already existing, or do we really want hundreds of them by introducing a limit of 100? I think it's better as it is compared to the alternative.
jodokus31 wrote: Sun Jun 30, 2024 9:16 am I also stumbled over those mods. Not really sure, what to think about them.
The "all-the-modportal" sounds a bit like a leeching tool to host/store the mods somewhere else.
They are used by other mods "legitimately" as dependencies to ensure they load last.
I'd rather have the possibility to declare an opportunistic "load me as late as possible", falling back to the usual ordering rules to resolve conflicts.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 3:28 pm
by robot256
Qon wrote: Tue Jul 09, 2024 8:56 am If you read about https://mods.factorio.com/mod/sparkletr ... mers-final you see why these other mods are needed. Apparently they can be used to improve performance of other mods! :) :idea:
That mod itself explains that it is a terrible hack and has not been tested to ensure all the dependencies don't cause unintended effects.
There are probably much better ways to improve the performance of the underlying mod, or there is a smaller list of mods that it actually needs to depend on/load after.

In my own mods I put a lot of effort into making sure dependencies are not required for most things, using the three data stages for the intended purposes. I did have to contact other mod authors to ask them to correct how their mod code behaved to avoid circular dependencies and such.

It would be a better experience for users if mod makers put more thought into their dependencies. Sure it would limit how much some of them contribute to the community, but that's a tradeoff we should discuss.

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 4:53 pm
by Merssedes
curiosity wrote: Tue Jul 09, 2024 7:27 am
You still need to parse the result. And I didn't say it was a lot of work, I only said it was more work than dividing them up.
List of just names (bash code):

Code: Select all

curl https://mods.factorio.com/api/mods?page_size=max|jq '.results[].name'

Re: Limit the number of a direct dependencies per mod

Posted: Tue Jul 09, 2024 8:54 pm
by curiosity
Merssedes wrote: Tue Jul 09, 2024 4:53 pm List of just names (bash code):

Code: Select all

curl https://mods.factorio.com/api/mods?page_size=max|jq '.results[].name'
Case in point, coming up with that command is more work than splitting up the resulting list.

Re: Limit the number of a direct dependencies per mod

Posted: Wed Jul 10, 2024 6:36 pm
by Merssedes
curiosity wrote: Tue Jul 09, 2024 8:54 pm
Merssedes wrote: Tue Jul 09, 2024 4:53 pm List of just names (bash code):

Code: Select all

curl https://mods.factorio.com/api/mods?page_size=max|jq '.results[].name'
Case in point, coming up with that command is more work than splitting up the resulting list.
You can split entire list of 13k+ mods in 2 minutes?

Re: Limit the number of a direct dependencies per mod

Posted: Wed Jul 10, 2024 10:55 pm
by curiosity
Merssedes wrote: Wed Jul 10, 2024 6:36 pm You can split entire list of 13k+ mods in 2 minutes?
Sure, with any editor that shows line number.

Re: Limit the number of a direct dependencies per mod

Posted: Thu Jul 11, 2024 4:38 am
by Merssedes
curiosity wrote: Wed Jul 10, 2024 10:55 pm
Merssedes wrote: Wed Jul 10, 2024 6:36 pm You can split entire list of 13k+ mods in 2 minutes?
Sure, with any editor that shows line number.
I'd like too see this in action... :(
But IMHO, we gone offtopic.

Re: Limit the number of a direct dependencies per mod

Posted: Thu Jul 11, 2024 6:58 am
by curiosity
Merssedes wrote: Thu Jul 11, 2024 4:38 am But IMHO, we gone offtopic.
The point is, this suggestion will do nothing but add to the number of useless garbage mods, not to mention the additional garbage mods required by legitimate use cases. The increase in difficulty you point out is barely noticeable, and that's before any kind of automation.

Re: Limit the number of a direct dependencies per mod

Posted: Thu Jul 11, 2024 5:00 pm
by Merssedes
curiosity wrote: Thu Jul 11, 2024 6:58 am
Merssedes wrote: Thu Jul 11, 2024 4:38 am But IMHO, we gone offtopic.
The point is, this suggestion will do nothing but add to the number of useless garbage mods, not to mention the additional garbage mods required by legitimate use cases. The increase in difficulty you point out is barely noticeable, and that's before any kind of automation.
OK. Are you able to write automated generation of such modpack?

Re: Limit the number of a direct dependencies per mod

Posted: Fri Jul 12, 2024 1:48 am
by curiosity
Merssedes wrote: Thu Jul 11, 2024 5:00 pm OK. Are you able to write automated generation of such modpack?
Sure, why not.

Re: Limit the number of a direct dependencies per mod

Posted: Sat Jul 27, 2024 10:23 am
by Merssedes
curiosity wrote: Thu Jul 11, 2024 6:58 am
Merssedes wrote: Thu Jul 11, 2024 4:38 am But IMHO, we gone offtopic.
The point is, this suggestion will do nothing but add to the number of useless garbage mods, not to mention the additional garbage mods required by legitimate use cases. The increase in difficulty you point out is barely noticeable, and that's before any kind of automation.
BTW, there is no automated way to upload mods, therefore it will have to be done by hand. How much time does it take to upload new mod? And 130 new mods?