Is the sbteclipse plugin broken?

603 views
Skip to first unread message

Bjorn Regnell

unread,
Aug 7, 2016, 10:49:45 AM8/7/16
to scala-user
I just got this error msg from projects that previously were built just fine with sbt.
Has the sbteclipse plugin been removed or is it broken? Are anyone else experiencing the same thing?
Any help welcome as this is a show stopper...

[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0 ...
[warn]     module not found: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/4.0.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/4.0.0/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /home/bjornr/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/4.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[info] Resolving jline#jline;2.12.1 ...
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]     Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]         com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn]     Note: Unresolved dependencies path:
[warn]         com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/home/bjornr/lthgitlab/pgk/project/plugins.sbt#L1-2)
[warn]           +- default:pgk-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
    at sbt.IvySbt.withIvy(Ivy.scala:128)
    at sbt.IvySbt.withIvy(Ivy.scala:125)
    at sbt.IvySbt$Module.withModule(Ivy.scala:156)
    at sbt.IvyActions$.updateEither(IvyActions.scala:168)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1439)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1435)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1470)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1468)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1473)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1467)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1490)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1417)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1369)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

Viktor Klang

unread,
Aug 7, 2016, 5:42:51 PM8/7/16
to Bjorn Regnell, scala-user

Hej Björn,

I see you commented on the Issue, did you try the steps as outlined here[1]?

1: https://github.com/typesafehub/sbteclipse/issues/315#issuecomment-226781879

--
Cheers,


--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Björn Regnell

unread,
Aug 8, 2016, 8:09:46 AM8/8/16
to Viktor Klang, scala-user
Hejsan Viktor!

Yes, I removed the folder with the plugin from my .ivy/chache and I've also tried to add extra resolvers etc.
The plugin dependency is in project/ as said etc.

Am I over-looking some info or hint in the issue thread that I should try, that you meant more specifically?

The build.sbt used to work just fine just recently and the build broke for no apparent reason...
Here is the build.sbt with the eclipse-plugin-related stuff commented away to keep the show going.
https://github.com/lunduniversity/introprog/blob/336c03ad8/build.sbt

And here is how the plugins.sbt looked like before I had to remove it to get the build working:

$ cat project/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

I actually tried to build the plugin myself from cloning the github page, but I get other strange "unresolved dependencies" errors... And the build is actually marked "failing" on the plugin's github home: https://github.com/typesafehub/sbteclipse
I also tried to simply put the sbteclipse-plugin-4.0.0.jar in the project/lib folder and the lib folder but none of that helped.

There's a question in the issue list on mismatches about scala version 2.10 vs 2.11 and the warning I get points to scala 2.11:


[warn]     Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]         com.typesafe.sbteclipse:
sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)

But I haven't found a way to tell sbt to look for scalaVersion=2.10 specifically for the plugin resolution...
The jar is here and it says scala_2.10:
https://dl.bintray.com/sbt/sbt-plugin-releases/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.10/sbt_0.13/4.0.0/jars/
But the resolver seems to be wanting 2.11 for the plugin whatever I do... (and I need to build the sources in src using 2.11)

(Sorry, btw, if I'm posting this in the wrong forum; was uncertain if it should go to the scala-ide-user group or here -- there seem to be no active sbt-user mailing forum...)

Many thanks.

Greetings / Hälsningar
/B

Viktor Klang

unread,
Aug 8, 2016, 9:02:39 AM8/8/16
to Björn Regnell, scala-user
Perhaps you have a reference to the sbtecplise plugin somewhere else, too?

--
Cheers,

Björn Regnell

unread,
Aug 8, 2016, 9:18:14 AM8/8/16
to Viktor Klang, scala-user
Yes I have more plugins.sbt in subprojects, but removing those did not help, unfortunately.

Now, after my good night sleep I'll start living as I teach :) and make a minimal test case an reproduce it on different installations and versions etc. I'll be back soon with a report on how it goes...

Thanks,
/B

Björn Regnell

unread,
Aug 8, 2016, 11:06:02 AM8/8/16
to Viktor Klang, scala-user
Progress! (minimal test cases and A-B-testing with minimal context changes pay off...)

After making this minimal test case:
mkdir test-sbteclipse
cd test-sbteclipse
mkdir project
echo 'addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")' > project/plugins.sbt
sbt

I still got this on one machine:

[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]     Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]         com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]

BUT not on another "clean" machine, and when hunting down what differed it turns out to be that if you have any settings in ~/.sbt/0.13/global.sbt of scalaVersion the resolution process is nailed to the scalaVersion in ~/.sbt/0.13/global.sbt so if that the 2.10 plugin is not used. When commenting away the global setting
//scalaVersion := "2.11.8"
then the plugin resolution works. Although it is not a problem to have *project* settings with scalaVersion := "2.11.8"
This seems rather strange to me, but perhaps this is the way it should work?
Should the project specific only override global default settings for the compilation process but not the dependency resolution process?
The same is actually true for
//sbtVersion := "0.13.12"
which if shadowed by a project-specific build.properties with sbt.version=0.13.11 renders strange resolution problems such as:

[info] 'compiler-interface' not yet compiled for Scala 2.11.8. Compiling...
/tmp/sbt_e8db7dbd/xsbt/ExtractUsedNames.scala:133: error: value includeSynthToNameHashing is not a member of xsbti.AnalysisCallback
      (callback.includeSynthToNameHashing || !symbol.isSynthetic) &&
                ^
one error found
[info] Attempting to fetch org.scala-sbt % compiler-interface % 0.13.12. This operation may fail.
[info] Resolving org.scala-sbt#interface;0.13.12 ...
[error] (compile:compileIncremental) Error compiling sbt component 'compiler-interface'

*** Conclusion: this is what to do:
* do not use any settings in  ~/.sbt/0.13/global.sbt if any of your project or subproject may require something else or have plugins that are not offered in a version compiled for your global settings (breaks even if you have project specific settings)
* make sure all subprojects have nailed an sbt-version setting; or else things may suddenly break when a new sbt version comes along and automatically gets downloaded...
* make sure all sbt-version settings are aligned in global.sbt and all build.properties of all subprojects

I'll make a post in the open issue of sbteclipse at github to share my findings.

Also, when reading the sbt doc of global settings I can't tell what happens if you have conflicting settings in global.sbt and project's build.sbt and build.properties and plugins.sbt etc. Anyone knows how the priority of conflicting settings should be or where to find that information? Is this a bug or a feature?

Thanks,
/B
You received this message because you are subscribed to a topic in the Google Groups "scala-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-user/6AJp0ZnYajU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-user+...@googlegroups.com.

Viktor Klang

unread,
Aug 8, 2016, 11:08:41 AM8/8/16
to Björn Regnell, scala-user
Nice detective work!

To unsubscribe from this group and all its topics, send an email to scala-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




--
Cheers,

Björn Regnell

unread,
Aug 8, 2016, 11:16:17 AM8/8/16
to Viktor Klang, scala-user
:)

Do you know if it is a bug or a feature that global.sbt default settings trumps project settings so that the resolution process is "confused"?

And if it is a feature, what is its rationale (i.e. when do you want projects to be forced to another version than they require)?

/B

Viktor Klang

unread,
Aug 8, 2016, 11:27:20 AM8/8/16
to Björn Regnell, scala-user
Great question! Someone here might know: https://gitter.im/sbt/sbt

Björn Regnell

unread,
Aug 8, 2016, 12:52:25 PM8/8/16
to Viktor Klang, scala-user
thanks, I'll try there
/B
Reply all
Reply to author
Forward
0 new messages