Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid repeating versions in Eviction warning message #433

Merged

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented Sep 16, 2023

As with PR #386, which dealt with Eviction errors, this fixes the way EvictionWarning reports the list of evicted versions - removing duplicate revisions that look like this:

* org.scala-lang.modules:scala-java8-compat_2.13:1.0.2 is selected over {1.0.0, 1.0.0}

This fix does a refactor so that both EvictionError & EvictionWarning are using the same logic to generate the revision string - the logic is moved to the new field EvictionPair.evictedRevs.

As with sbt#386, which dealt
with Eviction *errors*, this fixes the way Eviction *warnings* report
the list of evicted versions - removing duplicate versions - and does a
refactor so that both `EvictionError` & `EvictionWarning` are using the
same logic to generate the revision string.

The logic for the revisions string is moved to the new field
`EvictionPair.evictedRevs`.

Without this fix, we see Eviction warnings like this:

```
* org.scala-lang.modules:scala-java8-compat_2.13:1.0.2 is selected over {1.0.0, 1.0.0}
```
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit aa090bd into sbt:develop Sep 18, 2023
4 checks passed
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.

2 participants