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

Stewart try to update it as being another dependency #3222

Open
FabioPinheiro opened this issue Nov 26, 2023 · 3 comments
Open

Stewart try to update it as being another dependency #3222

FabioPinheiro opened this issue Nov 26, 2023 · 3 comments

Comments

@FabioPinheiro
Copy link

I can't find any reason why Stewart could try to update scala-java-time as being the scalajs-dom.
In this PR FabioPinheiro/scala-did#177 title Update scalajs-dom_sjs1_3 to 2.8.0.

Updated to 2.8.0 but the latest version is 2.5.0 https://mvnrepository.com/artifact/io.github.cquiroz/scala-java-time

lazy val V = new {
  val scalajsDom = "2.8.0"
  val scalaJavaTime = "2.3.0"
  ...
}
lazy val D = new {
  val dom = Def.setting("org.scala-js" %%% "scalajs-dom" % V.scalajsDom)
  val scalaJavaT = Def.setting("io.github.cquiroz" %%% "scala-java-time" % V.scalaJavaTime)
  val scalaJavaTZ = Def.setting("io.github.cquiroz" %%% "scala-java-time-tzdb" % V.scalaJavaTime)
  ...
}
@FabioPinheiro FabioPinheiro changed the title Updated the wrong dependency Stewart try to update it as being another dependency Nov 26, 2023
@fthomas
Copy link
Member

fthomas commented Nov 27, 2023

If you run sbt libraryDependencies, you'll see that some modules of your project depend on org.scala-js:scalajs-dom_sjs1_3:2.3.0. For example:

[info] didJS / libraryDependencies
[info] 	List(org.scala-lang:scala3-library_sjs1:3.3.1,
  org.scala-js:scalajs-library_2.13:1.14.0,
  org.scala-js:scalajs-test-bridge_2.13:1.14.0:test,
  org.scala-js:scalajs-dom_sjs1_3:2.3.0,
  com.olvind:scalablytyped-runtime_sjs1_3:2.4.2,
  org.scalameta:munit:1.0.0-M10:test, dev.zio:zio-json:0.6.2,
  com.github.poslegm:munit-zio:0.2.0:test,
  org.scala-js:scalajs-java-securerandom:1.0.0)

Scala Steward bumped the scala-java-time version because it was the only 2.3.0 version it could find in the build and the names of both libraries have the same prefix. I guess you want to change your build such that all scalajs-dom dependencies have the same version.

@FabioPinheiro
Copy link
Author

FabioPinheiro commented Nov 27, 2023

Thanks @fthomas
Indeed that was unexpected.
I never added the dependency to libraryDependencies it must be one of the plugins.

After exploring the dependencyTree that module

  • I force the the latest dependency of zio (a transitive dependency of zio-json)
  • this will force a version bump of scalajs-dom from version 2.3.0 to 2.7.0
  • In the JS part of crossProject I forced again a version bump of scalajs-dom version to 2.8.0

But I still have the version 2.3.0 in the libraryDependencies.
The didJS / libraryDependencies now show both org.scala-js:scalajs-dom_sjs1_3:2.3.0 and org.scala-js:scalajs-dom:2.8.0.
If the name was the same I would be confident that latest would supersede the other.

Not sure if I should force a remove of that by filtering the content in libraryDependencies?

(In summary I'm more confused than Scala Stewart)

FabioPinheiro added a commit to FabioPinheiro/scala-did that referenced this issue Nov 27, 2023
See scala-steward-org/scala-steward#3222
===
I never added the dependency scalajs-dom to 'libraryDependencies' it must be one of the plugins.

After exploring the 'dependencyTree' the module didJS:
- I force the the latest dependency of `zio` (a transitive dependency of `zio-json`)
 - this will force a version bump of scalajs-dom from version `2.3.0` to `2.7.0`
- In the JS part of crossProject I forced again a version bump of scalajs-dom version to `2.8.0`

But I still have the version 2.3.0 in the libraryDependencies.
The 'didJS / libraryDependencies' now show both 'org.scala-js:scalajs-dom_sjs1_3:2.3.0' and 'org.scala-js:scalajs-dom:2.8.0'.
If the name was the same I would be confident that latest would supersede the other.

Not sure if I should force a remove of that by filtering the content in 'libraryDependencies'?
@FabioPinheiro
Copy link
Author

Not sure how Stewart search for those versions.

okay I can imagine if we force it and search by text* will point out that variable is the best place to try.

Hum but after update shouldn't Stewart confirm that the version was updated?

I'm convinced the version is coming from one of the plugins (but I didn't search).
In this case there isn't much that Stewart can do about it.
Unless we want to add the dependency forcing the latest version.
Feel free to close the ticket if your thing it's working as expected.

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

No branches or pull requests

2 participants