question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sbt-lm-coursier breaks the dotty build, seems to produce broken UpdateReports in some cases

See original GitHub issue

Discovered when testing sbt 1.3.0-RC1 but can be reproduced by adding:

addSbtPlugin("io.get-coursier" % "sbt-lm-coursier" % "1.1.0-M14-2")

To https://github.com/lampepfl/dotty/blob/master/project/plugins.sbt

> show dotty-compiler/scalaInstance
[error] java.lang.AssertionError: assertion failed: There should only be one ExactFilter(dotty-library_0.14) jar but found: Vector()
[error]         at scala.Predef$.assert(Predef.scala:219)
[error]         at dotty.tools.sbtplugin.DottyPlugin$.getJar(DottyPlugin.scala:388)
[error]         at dotty.tools.sbtplugin.DottyPlugin$.$anonfun$projectSettings$16(DottyPlugin.scala:282)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:278)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (dotty-compiler / scalaInstance) java.lang.AssertionError: assertion failed: There should only be one ExactFilter(dotty-library_0.14) jar but found: Vector()

getJar is failing because the UpdateReport we got for dottty-doc_0.14 is missing dotty-library_0.14 (this is an artifact available on maven: https://repo1.maven.org/maven2/ch/epfl/lamp/dotty-doc_0.14/0.14.0-RC1/), the relevant code is: https://github.com/lampepfl/dotty/blob/2b6c757adb3bba7d3eebfa0ac2e216ba63640698/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala#L267-L281

What’s weird is that dotty-library/scalaInstance succeeds, and it should be running the exact same code asking for the UpdateReport of the same artifact, but somehow we get two different UpdateReports.

Working UpdateReport: https://gist.githubusercontent.com/smarter/35d3f854a0d1ca83ea219e1af15e2d7b/raw/a8977006eaab704a2b15439831beb0db58915342/working.txt Broken UpdateReport: https://gist.githubusercontent.com/smarter/35d3f854a0d1ca83ea219e1af15e2d7b/raw/a8977006eaab704a2b15439831beb0db58915342/broken.txt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (28 by maintainers)

github_iconTop GitHub Comments

1reaction
smartercommented, May 21, 2019

For the record, when using sbt-lm-coursier, I can get the result I want (that is, the same behavior that I get without lm-coursier in sbt 1.2) by using lmcoursier.CoursierDependencyResolution(coursierConfiguration.value.withInterProjectDependencies(Vector.empty)).

0reactions
smartercommented, Jul 11, 2019

Thanks! Can this get into sbt 1.3.0 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt-coursier
x versions of sbt, sbt-coursier ensures one's dependencies are fetched via coursier rather than by sbt itself, that relied on its own custom...
Read more >
scalameta/scalafmt - Gitter
Hi. We're seeing some issues where scalafmt is rewriting previously valid code to code that no longer compiles under Dotty. object ...
Read more >
sbt Reference Manual — Combined Pages
sbt is a build tool for Scala, Java, and more. ... Define a classpath that pulls the dependencies from the Update Report produced...
Read more >
import of project via sbt shell is broken in case coursier plugin ...
Create simple scala sbt project. sbt version = 1.3.3 add following to plugins.sbt: addSbtPlugin("io.get-coursier" % " ...
Read more >
Towards Scala 3 - Hacker News
Yes, some people who previously used Scala, now use Kotlin. ... From the latest reports, dotty appears to compile at about the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found