scala-steward icon indicating copy to clipboard operation
scala-steward copied to clipboard

Too many libs updated

Open terryhendrix1990 opened this issue 3 years ago • 1 comments

Hi there!

First of all, much thanks for fixing a previous bug so our version number specification is supported. We are encountering a new issue, I'm hoping we can get some support. :)

In our organisation we use change detection to only build packages when they are changed. This means that sometimes only a part of the libraries with a certain group-id is updated to a newer version. The unchanged libraries stay at their last version.

We see that scala-steward makes updates a little to "aggressive", as it updates all the versions of the changed group ID.

Here is an example. I've marked the differences with a *

This is what scala steward did:

val dexDomainCoreVersion         = "1.0.0-20220128-113409-a0b3ebe8"
val dexDomainCoreCirceVersion    = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonLoggingVersion      = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonAggregationVersion  = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonCassandraVersion    = "1.0.0-20220128-113409-a0b3ebe8" *
val dexCommonKafkaVersion        = "1.0.0-20220128-113409-a0b3ebe8" * 
val dexCommonServiceVersion      = "1.0.0-20220128-113409-a0b3ebe8" *
val dexCommonStreamsVersion      = "1.0.0-20220128-113409-a0b3ebe8" *
val dexCommonTestVersion         = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonTrackTraceVersion   = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonTransitTimesVersion = "1.0.0-20220128-113409-a0b3ebe8"

This is correct:

val dexDomainCoreVersion         = "1.0.0-20220128-113409-a0b3ebe8"
val dexDomainCoreCirceVersion    = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonLoggingVersion      = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonAggregationVersion  = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonCassandraVersion    = "1.0.0-20220127-064601-e4cec381" *
val dexCommonKafkaVersion        = "1.0.0-20220127-064601-e4cec381" *
val dexCommonServiceVersion      = "1.0.0-20220127-064601-e4cec381" *
val dexCommonStreamsVersion      = "1.0.0-20220127-064601-e4cec381" *
val dexCommonTestVersion         = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonTrackTraceVersion   = "1.0.0-20220128-113409-a0b3ebe8"
val dexCommonTransitTimesVersion = "1.0.0-20220128-113409-a0b3ebe8"

These values are used as follows:

"io.company.dex"      %% "dex-domain-core"                      % dexDomainCoreVersion
"io.company.dex"      %% "dex-domain-core-circe"            % dexDomainCoreCirceVersion
"io.company.dex"      %% "dex-common-aggregation"       % dexCommonAggregationVersion
"io.company.dex"      %% "dex-common-track-trace"         % dexCommonTrackTraceVersion
"io.company.dex"      %% "dex-common-kafka"                   % dexCommonKafkaVersion
"io.company.dex"      %% "dex-common-cassandra"          % dexCommonCassandraVersion

For the marked items: These do not exist with the newer version. It would be great if scala steward could check if a version exists in the artifact repo, before changing it.

terryhendrix1990 avatar Feb 02 '22 10:02 terryhendrix1990

Perhaps having a configurable UpdateHeuristic would help?

jan-pieter avatar Feb 07 '22 15:02 jan-pieter

Solved by implementing the new grouping feature.

terryhendrix1990 avatar Nov 29 '22 12:11 terryhendrix1990