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

sbt-updates stopped working for me #211

Closed
bwbecker opened this issue Mar 2, 2021 · 4 comments
Closed

sbt-updates stopped working for me #211

bwbecker opened this issue Mar 2, 2021 · 4 comments

Comments

@bwbecker
Copy link

bwbecker commented Mar 2, 2021

sbt-updates stopped working for me. I know that's not helpful, but if there are any suggestions for how to debug, I'd welcome them.

I've used it on this project in the past and it's been very helpful. Today, however, it just gives

oat] $ dependencyUpdates
[info] Found 1 dependency update for oat
[info]   org.scala-lang:scala-library : 2.12.13 -> 2.13.5
[info] Found 2 dependency updates for wsvc
[info]   com.github.spullara.mustache.java:scala-extensions-2.11 : 0.9.6   -> 0.9.7          
[info]   org.scala-lang:scala-library                            : 2.12.13          -> 2.13.5
[info] Found 1 dependency update for wapp
[info]   org.scala-lang:scala-library : 2.12.13 -> 2.13.5
[success] Total time: 1 s, completed Mar. 2, 2021, 3:20:18 p.m.

when I know there are other dependencies that require updating.

In addition, the output has no mention of subprojects involving Scala.js (which have dependencies that need updating).

@rtimush
Copy link
Owner

rtimush commented Mar 2, 2021

I'd suggest running sbt -debug dependencyUpdates. The plugin will list all URLs it tries to access looking for dependency updates, so you may check if they make sense. Another possible cause is #67, if you have crossScalaVersions defined.

@bwbecker
Copy link
Author

bwbecker commented Mar 3, 2021

Thanks for the suggestion. The list of URLs it checks is pretty short:

[debug] Downloading https://jcenter.bintray.com/ca/uwaterloo/playformsst_2.12/maven-metadata.xml anonymously
[debug] Downloading https://repo1.maven.org/maven2/com/github/spullara/mustache/java/scala-extensions-2.11/maven-metadata.xml anonymously
[debug] Downloading https://jcenter.bintray.com/com/github/spullara/mustache/java/scala-extensions-2.11/maven-metadata.xml anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/com/github/spullara/mustache/java/scala-extensions-2.11/maven-metadata.xml anonymously
[debug] Downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/maven-metadata.xml anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/org/scala-lang/scala-library/maven-metadata.xml anonymously
[debug] Downloading https://jcenter.bintray.com/org/scala-lang/scala-library/maven-metadata.xml anonymously
[debug] Downloading https://repo1.maven.org/maven2/ca/uwaterloo/playformsst_2.12/maven-metadata.xml anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/ca/uwaterloo/playformsst_2.12/maven-metadata.xml anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/org/scala-lang/scala-library/ anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/com/github/spullara/mustache/java/scala-extensions-2.11/ anonymously
[debug] Downloading https://repo1.maven.org/maven2/ca/uwaterloo/playformsst_2.12/ anonymously
[debug] Downloading https://cs.uwaterloo.ca/~cs-oat/maven/ca/uwaterloo/playformsst_2.12/ anonymously
[debug] Downloading https://jcenter.bintray.com/ca/uwaterloo/playformsst_2.12/ anonymously

That doesn't come close to the entire list that it should be checking. The cs.uwaterloo.ca URLs are for my own repo.

I'm not cross-compiling, so I don't think #67 is relevant. I'm targeting only Scala 2.12.13.

The structure of the project is:

xplatform{JS,JVM}               // my most basic stuff
     browser                           // ScalaJS stuff that depends on xplatformJS
     server                             // common JVM stuff that depends on xplatformJVM
          wapp                         // part of the server api; depends on server (and indirectly xplafform)
          wsvc                          // another part of the server api; also depends on server

This is all gathered together in the oat project that aggregates wapp and wsvc and depends on both of those as well.

I was surprised tonight that show libraryDependencies did not include the libraries specified by the depended-on projects. In the oat (top-level) project it showed libraries from wapp and wsvc but not server and lower (where most of the libraries are specified. server did not show anything from xplatform.

@bwbecker
Copy link
Author

bwbecker commented Mar 3, 2021

My memory was that a single application of dependencyUpdates at the top-level project was all that was required. Apparently my memory is bad or that behaviour has changed. In any case, applying dependencyUpdates in each of the subprojects did what I needed.

Thanks for your help.

@bwbecker bwbecker closed this as completed Mar 3, 2021
@rtimush
Copy link
Owner

rtimush commented Mar 6, 2021

Good to hear that you found a solution!
dependencyUpdates follows the regular sbt project aggregation rules. Usually, the root sbt project aggregates all children, so it's enough to just call dependencyUpdates, but if there are non-aggregated subprojects you indeed need to run <subproject>/dependencyUpdates explicitly.

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