scala-js / scala-js-website

Source for https://www.scala-js.org/
259 stars 146 forks source link

Bump the version of sbt in the tutorial. #580

Closed blakehawkins closed 2 years ago

blakehawkins commented 2 years ago

Hey! Thanks for looking

I got unresolved dependencies when I specify scala on 3.1.0, 3.1.1, 3.1.2, or 3.1.3:

[error] sbt.librarymanagement.ResolveException: Error downloading org.scala-lang:scala3-library_sjs1_3.1:3.1.0
[error]   Not found
[error]   Not found
[error]   not found: /home/blake/.ivy2/local/org.scala-lang/scala3-library_sjs1_3.1/3.1.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/scala-lang/scala3-library_sjs1_3.1/3.1.0/scala3-library_sjs1_3.1-3.1.0.pom
[error] Error downloading org.scala-lang:scala-library:3.1.0
[error]   Not found
[error]   Not found
[error]   not found: /home/blake/.ivy2/local/org.scala-lang/scala-library/3.1.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/scala-lang/scala-library/3.1.0/scala-library-3.1.0.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:246)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:215)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:215)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2947)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]         at sbt.Execute.work(Execute.scala:290)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error]         at java.base/java.lang.Thread.run(Thread.java:833)

On latest 2.x this error goes away

sjrd commented 2 years ago

Ah, that's because the sbt version that's suggested there is ancient. With the latest 1.7.1, this should go much better.

blakehawkins commented 2 years ago

Thanks @sjrd that's done the trick!

Would it be helpful for me to update this PR to instead bump the recommended version of sbt, or will that then cause problems for lower versions of scala?

It would be nice to publish a matrix of supported versions for [scalajs, scala, sbt] IMO

sjrd commented 2 years ago

Would it be helpful for me to update this PR to instead bump the recommended version of sbt,

Yes, please. We can always bump the version of sbt. The newer versions of sbt always support the older versions of Scala.js and Scala; like the newer versions of Scala.js always support the older versions of Scala.