Allow totally incompatible modules in changeset #2869
Merged
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.
Problem
In #2821 we added the ability to select a specific version of a module to install in GUI rather than only installing the latest compatible. As part of this, incompatible versions were allowed as well.
However, you could only install an incompatible version if at least one other version of the module was compatible. Modules with no compatible versions (let's call them "totally incompatible") could be selected but would not show up in the changeset and could not be installed.
Cause
Totally incompatible modules were excluded in two ways, in line with the old assumptions about installability:
MainModList.ComputeUserChangeSet
only checked modules for whichIsInstallable
is true (it's false for totally incompatible modules)GUIMod.GetRequestedChanges
only allowed installing a new module if the install checkbox was visible and checked (it's-
for totally incompatible modules), and changing from one version to another only worked if the module was already installedChanges
MainModList.ComputeUserChangeSet
checks all modulesGUIMod.GetRequestedChanges
can return an installation change even if the installation checkbox isn't available, as long asInstalledMod
andSelectedMod
aren't the same. As part of this, the old install/uninstall logic and the newer version-switching logic are unified to a single block.@xZise, if you'd like to try this change, here's a test build:
Fixes #2868.