Scastie using Scala 2.13

I’m trying to test some code using Scastie, and I get a strange error. Does anyone know whether Scastie works for Scala 2.13?

sbt.librarymanagement.ResolveException: Error downloading com.github.dmarcous:s2utils_2.13:1.1.0
  Not found
  Not found
  not found: /home/sbtRunnerContainer/.ivy2/local/com.github.dmarcous/s2utils_2.13/1.1.0/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/com/github/dmarcous/s2utils_2.13/1.1.0/s2utils_2.13-1.1.0.pom
  not found: http://scala-webapps.epfl.ch:8081/artifactory/scastie-ivy/com.github.dmarcous/s2utils_2.13/1.1.0/ivys/ivy.xml
  not found: http://scala-webapps.epfl.ch:8081/artifactory/scastie-maven/com/github/dmarcous/s2utils_2.13/1.1.0/s2utils_2.13-1.1.0.pom

sbt.librarymanagement.ResolveException: Error downloading com.github.dmarcous:s2utils_2.13:1.1.0
  Not found
  Not found
  not found: /home/sbtRunnerContainer/.ivy2/local/com.github.dmarcous/s2utils_2.13/1.1.0/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/com/github/dmarcous/s2utils_2.13/1.1.0/s2utils_2.13-1.1.0.pom
  not found: http://scala-webapps.epfl.ch:8081/artifactory/scastie-ivy/com.github.dmarcous/s2utils_2.13/1.1.0/ivys/ivy.xml
  not found: http://scala-webapps.epfl.ch:8081/artifactory/scastie-maven/com/github/dmarcous/s2utils_2.13/1.1.0/s2utils_2.13-1.1.0.pom
	at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:245)
	at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:214)
	at scala.util.Either$LeftProjection.map(Either.scala:573)
	at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:214)
	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
	at scala.util.control.Exception$Catch.apply(Exception.scala:228)
	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
	at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
	at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2946)
	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
	at sbt.std.Transform$$anon$4.work(Transform.scala:67)

I don’t think the problem is Scastie per se – those errors suggest that that library / version hasn’t been published for 2.13… Ah, I see – that library is part of Scastie’s standard setup. Yeah, does look like something is weird right now…

Reported on scala-contributors…

The issue is that s2utils doesn’t exist for Scala 2.13. I’m not sure why this is in the dependencies. If you go to the build settings and click “Reset” then it removes it.

1 Like

I don’t think it’s part of the standard setup.

… okay, that works, but I confess I’m surprised. Is the implication that Scastie silently stuffs the settings from the most recent build you looked at into your cookies?

I think it just saves the build together with the code when you share a scastie. But if you start a new one then you get a fresh default build.

1 Like

SBT printed the locations it tried before failing with unresolved dependency. A quick way to check what version of Scala the library is compiled for is to cut the URL and browse it. For example SBT printed:

  not found: https://repo1.maven.org/maven2/com/github/dmarcous/s2utils_2.13/1.1.0/s2utils_2.13-1.1.0.pom

If you cut the artifact name (s2utils_2.13) and later parts then you’re left with: https://repo1.maven.org/maven2/com/github/dmarcous If you browse that URL you’ll see that s2utils is published only for Scala 2.11 and Scala 2.12

That works for repositories like https://repo1.maven.org (since they contain all the publicly available artifacts) but doesn’t work for caches like local .ivy folder (since cache only contains already downloaded data).