Ignore conflicts between versions of same mod #2430
Merged
+41
−17
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
If a mod conflicts with itself, it can no longer be upgraded as of #2339; see #2428 for details of a specific example involving Scatterer.
Cause
When we upgrade, we ask the
SanityChecker
to look for missing dependencies and conflicts in a scenario in which the new versions are installed without removing the old versions. Since the old and new modules are both there, we check whether they conflict with one another, and a self-conflict is treated as a real conflict.Prior to #2339, this was avoided by ignoring conflicts if the identifiers were the same, but when we made conflicts version-specific, we only ignored that conflict if the identifier and version are the same.
Changes
Now
SanityChecker
will ignore any conflict between two mods with the same identifier, as it did historically. Other conflicts will still care about versions, so #2339 is not voided.A test is added to catch regressions.
Fixes #2428.