Skip to content

🐛 Check installed game version compatibility in mod install/update - #203

Merged
sakuro merged 7 commits into
mainfrom
fix/mod-install-update-check-game-version-compatibility
Aug 29, 2026
Merged

🐛 Check installed game version compatibility in mod install/update#203
sakuro merged 7 commits into
mainfrom
fix/mod-install-update-check-game-version-compatibility

Conversation

@sakuro

@sakuro sakuro commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

mod install and mod update selected MOD Portal releases without checking whether they're compatible with the installed Factorio game version, so an incompatible release could be selected and installed, leaving the game unable to load it.

Changes

  • dependency.EffectiveBaseRequirement: derives the version requirement a release places on base — an explicit, required base entry in its dependency strings when present, otherwise synthesized as >= factorio_version.
  • resolver.SelectLatest/SelectCompatible now take an installedBase *mod.MODVersion (nil skips the check) and filter out game-incompatible releases before picking the highest remaining version; Resolver.InstalledBase threads this through both the initial-spec and transitive-dependency selection paths.
  • mod install/mod update now compute the installed base MOD's version and wire it through, so the game-version filter applies to both commands.
  • mod download/mod sync are deliberately left unfiltered (out of scope for this issue), as is mod install <mod>@<exact-version> (an explicit version request is never filtered).

Test Plan

  • New unit tests: dependency.EffectiveBaseRequirement, resolver game-compatibility filtering (SelectLatest/SelectCompatible/Resolver), CLI integration tests for mod install/mod update skipping incompatible releases and picking the highest compatible one.
  • mise run default (test + e2e + vet + lint + fmt-check) passes.

Fixes #191

@sakuro
sakuro merged commit fbac823 into main Aug 29, 2026
2 checks passed
@sakuro
sakuro deleted the fix/mod-install-update-check-game-version-compatibility branch August 29, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mod install/update do not check compatibility with the installed game (base MOD) version

1 participant