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

getting updates for sbt plugins #10

Open
mheese opened this issue Nov 14, 2013 · 31 comments
Open

getting updates for sbt plugins #10

mheese opened this issue Nov 14, 2013 · 31 comments

Comments

@mheese
Copy link

mheese commented Nov 14, 2013

This is not really an issue, but a feature request: it would be extremely awesome if one could check sbt plugin updates with this sbt plugin as well.

@laughedelic
Copy link

You can easily do it by adding plugin to the "meta"-project so to say. For example, to add it globally, put in ~/.sbt/0.13/plugins/project/plugins.sbt the line

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.2")

Now in any project you can do (in sbt):

> reload plugins
> dependencyUpdates

then use reload return to return to the project.

Moreover, you can make an alias for that. Add to your ~/.sbt/0.13/global.sbt:

addCommandAlias("pluginUpdates", "; reload plugins; dependencyUpdates; reload return")

@mheese
Copy link
Author

mheese commented Nov 17, 2013

Awesome! Works like a charm! In my opinion this hint deserves a place in the README.md of this project.

@mheese mheese closed this as completed Nov 17, 2013
@rtimush
Copy link
Owner

rtimush commented Nov 18, 2013

Nice trick, @laughedelic, thanks. I'm reopening the issue because it was in my plans to add a native task for plugin updates.

@rtimush rtimush reopened this Nov 18, 2013
@pjean
Copy link

pjean commented Feb 3, 2014

👍

2 similar comments
@jkleckner
Copy link

👍

@analytically
Copy link

+1

@fommil
Copy link

fommil commented Jun 27, 2014

+1 for easier native method, e.g. pluginDependencyUpdates

@erikkaplun
Copy link

+1 for pluginUpdates

@wookietreiber
Copy link

👍

@jedesah
Copy link

jedesah commented Nov 5, 2014

+1 for native pluginUpdates

@He-Pin
Copy link

He-Pin commented Jan 27, 2015

+1

@antonini
Copy link

+1 for native pluginUpdates

@Ciantic
Copy link

Ciantic commented Sep 22, 2015

👍 The above trick works so there is no hurry, but I think it would still be valuable addition

@swsnr
Copy link

swsnr commented Mar 24, 2016

@rtimush I tried the above trick, but can't get it to work:

$ reload plugins
[info] Loading global plugins from /Users/XXX/dotfiles/scala/.sbt/0.13/plugins/project
[info] Loading global plugins from /Users/XXX/dotfiles/scala/.sbt/0.13/plugins
[info] Loading project definition from /Users/XXX/Developer/YYY/project
> dependencyUpdates
[info] Found 5 dependency updates for project
[info]   org.scala-lang:scala-compiler:ensime-internal : 2.10.6 -> 2.11.8
[info]   org.scala-lang:scala-library:ensime-internal  : 2.10.6 -> 2.11.8
[info]   org.scala-lang:scala-library:provided         : 2.10.6 -> 2.11.8
[info]   org.scala-lang:scala-reflect:ensime-internal  : 2.10.6 -> 2.11.8
[info]   org.scala-lang:scalap:ensime-internal         : 2.10.6 -> 2.11.8

dependencyUpdates includes updates for the Scala version, but not about outdated plugins, even though I deliberately downgraded a couple of plugins, both in my global plugins.sbt and in the plugins.sbt of the project.

@alexeyr
Copy link

alexeyr commented Apr 18, 2016

Same:

> reload plugins
[info] Loading global plugins from /home/aromanov/.sbt/0.13/plugins
[info] Updating {file:/home/aromanov/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /home/aromanov/IdeaProjects/scalan-lite-1/project
> show libraryDependencies
[info] List(org.scala-lang:scala-library:2.10.5:provided, com.eed3si9n:sbt-assembly:0.13.0 (e:sbtVersion=0.13, e:scalaVersion=2.10), com.github.gseitz:sbt-release:1.0.0 (e:sbtVersion=0.13, e:scalaVersion=2.10))
> dependencyUpdates
[info] Found 1 dependency update for project
[info]   org.scala-lang:scala-library:provided : 2.10.5 -> 2.10.6 -> 2.11.8

But current sbt-assembly version is 0.14.3 and sbt-release is 1.0.3.

@milessabin
Copy link

I'm seeing the same issue as @lunaryorn and @alexeyr.

@ruippeixotog
Copy link

The issue persists and @laughedelic's workaround doesn't work anymore, as people are saying. Is there another workaround that works? If not, is this feature scheduled for anytime soon?

@ruippeixotog
Copy link

Nevermind what I said, I updated sbt-updates to version 0.3.0 and the workaround seems to have started working again :)

@slothspot
Copy link

workaround doesn't work for me:

> reload plugins
[info] Loading project definition from /Users/dmitry/Projects/events/project
> show libraryDependencies
[info] * org.scala-lang:scala-library:2.10.6:provided
[info] * io.get-coursier:sbt-coursier:1.0.0-M15-1 (e:sbtVersion=0.13, e:scalaVersion=2.10)
[info] * org.ensime:sbt-ensime:1.12.6 (e:sbtVersion=0.13, e:scalaVersion=2.10)
[info] * io.spray:sbt-revolver:0.8.0 (e:sbtVersion=0.13, e:scalaVersion=2.10)
[info] * com.geirsson:sbt-scalafmt:0.5.6 (e:sbtVersion=0.13, e:scalaVersion=2.10)
[info] * org.scalastyle:scalastyle-sbt-plugin:0.8.0 (e:sbtVersion=0.13, e:scalaVersion=2.10)
[info] * com.timushev.sbt:sbt-updates:0.3.0 (e:sbtVersion=0.13, e:scalaVersion=2.10)
> dependencyUpdates
[error] Not a valid command: dependencyUpdates
[error] Not a valid key: dependencyUpdates (similar: dependencyClasspath, dependencyOverrides, dependency-overrides)
[error] dependencyUpdates
[error]                  ^
>

Am I missing something in sbt-updates setup?

@rtimush
Copy link
Owner

rtimush commented Feb 18, 2017

@slothspot did you setup sbt-updates just for the project or in the global sbt configuration file? In order to get dependency updates for sbt plugins you need to have sbt-updates configured globally.

@slothspot
Copy link

Oh, thanks for explanation. I prefer per-project plugins setup. May be it would be reasonable to add note about this in README?

@rtimush
Copy link
Owner

rtimush commented Feb 18, 2017

Yes, it is worth mentioning in the README. Regarding a per-project setup — I suppose if you add sbt-updates as a plugin to your build project (addSbtPlugin in project/project/sbt-updates.sbt) then it will work for plugin updates.

@slothspot
Copy link

In case of putting sbt-updates.sbt into project/project dependencyUpdates is not available for project itself, and placing sbt-updates.sbt twice inside of the project is not very convenient.

@nafg
Copy link

nafg commented Feb 19, 2017 via email

@slothspot
Copy link

@nafg, idea is clear and understandable. But since I use custom tasks which depend on plugins, I prefer when projects don't depend on per-user defined plugins.

@laughedelic
Copy link

@slothspot have you read this? Do you actually define any tasks depending on this plugin in the meta-project? I doubt it. So adding this plugin to your global scope meta-project is actually what you want:

projects don't depend on per-user defined plugins

@slothspot
Copy link

@laughedelic I've got main point already, and don't have any tasks depend on this plugin. But in general I prefer per-project plugins configuration and it was not clear for me after reading sbt-updates documentation that I need to define this plugin globally to make plugins update check work.

@steinybot
Copy link

steinybot commented Apr 3, 2018

Anyone tried the workaround with sbt-updates 0.3.4 and sbt 1.1.1? I can't get it to work.

It works for some plugins (e.g. lagom) but not others (e.g. dependency-check).

@dwijnand
Copy link

dwijnand commented May 3, 2018

Could probably look at https://github.com/scalacenter/load-plugin, which is able to load a plugin into the meta-build.

@DaimonPl
Copy link

DaimonPl commented Oct 2, 2018

Any idea if/when this would be implemented? :)

@anilkumarmyla
Copy link
Contributor

#110 documents on how to use sbt-updates as a project plugin. Rest catch all issues reported here might be fixed in the latest version, probably better to close this one and raise specific issues as new ones

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