🐛 Check installed game version compatibility in mod install/update - #203
Merged
sakuro merged 7 commits intoAug 29, 2026
Merged
Conversation
sakuro
deleted the
fix/mod-install-update-check-game-version-compatibility
branch
August 29, 2026 04:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mod installandmod updateselected 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 onbase— an explicit, requiredbaseentry in its dependency strings when present, otherwise synthesized as>= factorio_version.resolver.SelectLatest/SelectCompatiblenow take aninstalledBase *mod.MODVersion(nil skips the check) and filter out game-incompatible releases before picking the highest remaining version;Resolver.InstalledBasethreads this through both the initial-spec and transitive-dependency selection paths.mod install/mod updatenow compute the installed base MOD's version and wire it through, so the game-version filter applies to both commands.mod download/mod syncare deliberately left unfiltered (out of scope for this issue), as ismod install <mod>@<exact-version>(an explicit version request is never filtered).Test Plan
dependency.EffectiveBaseRequirement,resolvergame-compatibility filtering (SelectLatest/SelectCompatible/Resolver), CLI integration tests formod install/mod updateskipping incompatible releases and picking the highest compatible one.mise run default(test + e2e + vet + lint + fmt-check) passes.Fixes #191