-
Notifications
You must be signed in to change notification settings - Fork 502
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
Some dependencies not updated #2664
Comments
com-lihaoyi/mill#1954 as example in a live public repo that uses scala-steward |
Is there anything I could help with here? I had a dig and I can't figure out why this update didn't update, even though there's 9 new verisons of scalafmt-dynamic for example, spread over a few months. The group/artifact IDs are unchanged, so there is no need for an artifact migration like at release page There is no pinning to minor version in mill's scala-steward.conf either.
|
Maybe it's a problem with the public runer - more info here? |
Can the reproducible repo be provided? |
See #2664 (comment) (mill#1954) for an example.
I haven't scanned through these updates yet, but to illustrate what I did: In the mill repo, one can run
I will edit the comment and note if any of the current versions are especially old (i.e. if scala steward should have updated them by now). |
@exoego I think from all of the above, the only valid cases of Scala Steward missing updates are:
|
it previously opened: https://github.com/com-lihaoyi/mill/pull/1741/files so it has worked at some point (edit: is:pr is:closed author:scala-steward scalafmt ) |
The problem was with dependency configuration, not Scala Steward itself. Steward could not find a heuristic to do an upgrade with the dependencies we gave it. If anyone finds themselves with this issue, you can have a play with Scala Steward and try to figure out how you can tweak your dependencies so changes get picked up properly.
test("check".only) {
val original =
"""|object Circe {
| private val version = "0.14.1"
|
| val core = ivy"io.circe::circe-core:$version"
| }
|""".stripMargin
val expected =
"""|object Circe {
| private val version = "0.14.2"
|
| val core = ivy"io.circe::circe-core:$version"
| }
|""".stripMargin
val update = ("io.circe".g % Nel.of("circe-core".a) % "0.14.1" %> "0.14.2").group
assertEquals(update.replaceVersionIn(original), Some(expected) -> UpdateHeuristic.original.name)
} This does not find a heuristic to do upgrades with - the test fails. Steward PRs would not be raised for these dependencies. test("check".only) {
val original =
"""|object Circe {
| private val circeVersion = "0.14.1"
|
| val core = ivy"io.circe::circe-core:$circeVersion"
| }
|""".stripMargin
val expected =
"""|object Circe {
| private val circeVersion = "0.14.2"
|
| val core = ivy"io.circe::circe-core:$circeVersion"
| }
|""".stripMargin
val update = ("io.circe".g % Nel.of("circe-core".a) % "0.14.1" %> "0.14.2").group
assertEquals(update.replaceVersionIn(original), Some(expected) -> UpdateHeuristic.original.name)
} This finds the I don't see information/examples about heuristics in the docs. I would have found this helpful - it is a little bit odd, right? Do we want a PR for some documentation on this? |
One reason for missing updates could be the fact, that the Mill plugin of Scala Steward currently doesn't not support all Mill versions. You can find a more in-depth explanation in issue |
I didn't see another issue like this one, so I'm opening this.
I saw a few dependencies were outdated in a project despite daily scala-steward runs (on latest image). I confirmed there were updates with
mill mill.scalalib.Dependency/showUpdates
Here's some examples:
In the case of slf4j, 2.16.0 was Dec 2021 and 2.17.2 is Feb 2022. I manually updated it in late June, so Scala Steward wasn't picking up those updates for about half a year.
Some of these in an dependencies.sc file have the version as part of the value. Some have it interpolated into the ivy dependency. I don't see an obvious pattern for why some things get updates, but others don't.
Posssible causes
fail-fast
, so if you have a failed CI check then you won't ever get e.g. 0.0.1 -> 0.0.2 of a dependency? This is a total guess. I don't know how scala-steward works.The text was updated successfully, but these errors were encountered: