Open Caballero-Arepa opened 7 months ago
IMO querying the availability of an update is too costly at the moment.
Updating all "installed" mods at game start would be a background job that can run up to minutes - and then what if someone starts using a mod's data while the updater replaces the folder contents? Syncing nightmare. Unless it's a modal dialog "I'm updating" - but the decision whether to show it would already take a lot of bandwidth and time. Nah.
Could be easier using GraphQL as hinted in #10900, as you can fetch only the dates from a specific list of repositories in a single query with that API. Same caveat - it requires Authentication.
Doing such when loading a game would shorten the list, but the principle remains - one network round-trip per mod using the REST api, with 10900 possibly two for those using releases. One network round-trip total with GraphQL (plus actual update data).
Plus: Our RulesetCache is a preload-all type, so we would need to ditch and reload when we find an update... I'm pretty sure at the moment mod manager will ditch and reload all mods when a single one is updated - which is why it takes some time. That same delay on resuming a game would be unacceptable. Or do some more basic redesign to make that cache a load-on-demand type.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
Hmmm, what about a different aproach.
But perhaps this is not a big of a deal after all. Quite possibly an appendice feature, that could cause bugs for very little gain. So I know believe that the issue should be closed, to not waste anyone's time on this,
There's still the thing about the API efficiency. Such a 'follow' feature would be easy, single-roundtrip with the GraphQL api - for which these grinches made authentication mandatory. Which makes any coding frustrating by design. "Open Source" and mandatory trackability???
Just FYI - a certain nonpublic Unciv branch just ran its first autoupdate correctly.
As teaser - the first few lines of the framework source:
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
Before creating
Problem Description
It's not a big deal, but most people usually take a long time updating their mods, or we just don't notice that there is a new update, and we play with the old version of the mod with our friends.
Related Issue Links
No response
Desired Solution
It would be nice to have an option so when you open the game, it automatically starts updating the mods that have an update available.
If I want to join a game with a mod that is currently updating, then the game will stop me and make me wait for the mod that will be used to be updated.
Alternative Approaches
Or, a button inside the Mod Manager to "Update All".
Additional Context
No response