sbt-lm-coursier breaks the dotty build, seems to produce broken UpdateReports in some cases
See original GitHub issueDiscovered 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:
- Created 4 years ago
- Comments:28 (28 by maintainers)
Top GitHub Comments
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))
.Thanks! Can this get into sbt 1.3.0 ?