Page 1 of 1

[1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Fri Aug 21, 2020 8:23 am
by curiosity
Steps to reproduce:
1. Make an installation of the game with attached mods (truncated for size) and save.
2. Start the game, ensure that all mods are disabled. Sync mods with save.
3. Observe that Factory Planner isn't loaded.
4. Sync mods with save again. Note that it offers to download Factory Planner.
5. Observe that Factory Planner still isn't loaded.

I believe, this happens because Factory Planner started requiring flib, which I already have in my mods disabled. The game enables Factory Planner, but doesn't check any dependencies. You can see that the mod is red in the mod manager.

I would have expected the game to enable any required dependencies when enabling mods, same as it happens when you enable a mod manually.

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Sun Sep 27, 2020 3:13 pm
by Impatient
I just ran into the same issue and can confirm it.

I may have easier steps to reproduce:

1. Make a new savegame with mod "Picker Dollies" and mod "Factorio Standard Library" enabled.
2. Disable mod "Factorio Standard Library" -> Restart
3. Click sync mods with save on the created savegame.

Notice that mod "Picker Dollies" is listed as "Ready to download", although what it needs is it's dependency, mod "Factorio Standard Library", to be met by activating it.

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Wed Oct 21, 2020 8:16 pm
by Rseding91
I know why this happens but "solving" it is one of the biggest annoyances in the downloading mods logic. It basically has to recursively download info about each mod and its dependencies until it stops having more or it recourses back onto an already downloaded mod. If the 2nd happens then the whole thing just blows up and fails.

There's no nice solution to it. Maybe making sync-mods-with-save download the specific version that was in the save to prevent it...

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Fri Dec 04, 2020 5:58 pm
by vicarion
Could this be mitigated by setting a (very low) maximum recursion depth? Like 2 or 3.

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Fri Dec 04, 2020 6:04 pm
by ptx0
Rseding91 wrote:
Wed Oct 21, 2020 8:16 pm
It basically has to recursively download info about each mod and its dependencies until it stops having more or it recourses back onto an already downloaded mod. If the 2nd happens then the whole thing just blows up and fails.
i don't see how there's no nice solution to this. surely you're aware that things like Portage for Gentoo Linux have dependency tracking, and that it's considered a solved problem?

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Fri Dec 04, 2020 6:16 pm
by eradicator
Rseding91 wrote:
Wed Oct 21, 2020 8:16 pm
Maybe making sync-mods-with-save download the specific version that was in the save
That would generally be a benefitial feature.

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Thu Aug 05, 2021 6:34 am
by curiosity
Rseding91 wrote:
Wed Oct 21, 2020 8:16 pm
Maybe making sync-mods-with-save download the specific version that was in the save to prevent it...
I just thought of an issue with this. Some authors absolutely love to delete old versions, so the version may not exist and then you are back to square one.

Re: [1.0.0] Mod doesn't sync with save properly if the mod acquired new dependencies

Posted: Thu Aug 05, 2021 11:10 am
by KiwiHawk
Rseding91 wrote:
Wed Oct 21, 2020 8:16 pm
Maybe making sync-mods-with-save download the specific version that was in the save to prevent it...
This would be ideal for Sea Block! Would make it much easier to switch back to it after playing with other mods