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

Include transitive dependencies #72

Open
adamnfish opened this issue Apr 13, 2017 · 7 comments
Open

Include transitive dependencies #72

adamnfish opened this issue Apr 13, 2017 · 7 comments

Comments

@adamnfish
Copy link

It'd be nice to be able to see updates for all a project's dependencies, rather than just those explicitly mentioned in the libraryDependencies setting. This could be achieved via a setting or a separate task

In particular, if a library pulled in by one of your project's dependencies has a vulnerability it's great to be able to work out if there's a patch-upgrade available that would fix it. That's fairly tedious to do by hand, this plugin would make that very easy if it were possible.
I understand it's much more complicated than the current behaviour, perhaps combining this plugin with sbt-dependency-graph would be the easiest way to achieve it.

I'm interested to hear your thoughts on whether you think this would be a useful addition or if you feel it would be better as a separate tool.

@rtimush
Copy link
Owner

rtimush commented Apr 13, 2017

It is rather easy to implement, but I intentionally decided to display dependencies for direct dependencies only. I agree, this may be useful to be able to find patch updates that may fix vulnerabilities, probably with a separate task (or an argument to the existing task).

@adamnfish
Copy link
Author

If you've a pointer for me about how to retrieve the full, resolved list of dependencies I'll be happy to give it a crack.

@rtimush
Copy link
Owner

rtimush commented Apr 15, 2017

I'd say one of *Classpath (probably managedClasspath) tasks can give you a list of dependencies. If I am not mistaken they are returned as Attributed with maven/ivy coordinates as attributes.

@mxl
Copy link

mxl commented Aug 16, 2017

Plugin also does not show dependencies of subprojects.

lazy val commonModule = project.in(file("common"))
  .settings(
      libraryDependencies ++= Seq(
      "io.circe" %% "circe-generic" % "0.7.0"
    )
  )

lazy val root = project.in(file("."))
  .dependsOn(commonModule)

Running sbt dependencyUpdates will not show here that the new circe-generic version 0.8.0 is available.

Should I submit a separate issue?

@rtimush
Copy link
Owner

rtimush commented Aug 16, 2017

Adding .aggregate(commonModule) to root solved the problem. If you think such behavior is unexpected let's indeed continue in a separate issue.

@rtimush
Copy link
Owner

rtimush commented Jan 19, 2018

Preliminary implementation is on the https://github.com/rtimush/sbt-updates/tree/transitive-updates branch and available as 0.3.5-2+ga326a8e

@jtjeferreira
Copy link

@rtimush that branch is no longer available, so I am not sure if this feature was eventually merged or abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants