sbt-guardrail icon indicating copy to clipboard operation
sbt-guardrail copied to clipboard

Scala 2.13 support

Open REASY opened this issue 4 years ago • 7 comments

Quickly tried to just update the version to 2.13.6 and compile the project, it didn't work: image

image Error:

sbt-guardrail(master)> compile
[warn]
[warn]  Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last core / update for the full output
[error] (core / update) sbt.librarymanagement.ResolveException: Error downloading org.scala-sbt:scripted-sbt_2.13:1.5.5
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/org/scala-sbt/scripted-sbt_2.13/1.5.5/scripted-sbt_2.13-1.5.5.pom
[error]   not found: C:\Users\User\.ivy2\localorg.scala-sbt\scripted-sbt_2.13\1.5.5\ivys\ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/scripted-sbt_2.13/1.5.5/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/scripted-sbt_2.13/1.5.5/ivys/ivy.xml
[error] Total time: 7 s, completed Jul 24, 2021 5:28:02 PM

REASY avatar Jul 24 '21 09:07 REASY

Sorry for the delay in response! My GitHub Notifications got screwed up, I just re-watched all guardrail repositories a few weeks ago, but I didn't see your issue here.

sbt-guardrail is limited to 2.12 currently because sbt itself is limited to 2.12. guardrail will generate source code compatible with Scala 2.11, 2.12, and 2.13 (2.13 will also be usable from Scala 3 when using 2.13 source compatibility mode)

blast-hardcheese avatar Sep 02 '21 07:09 blast-hardcheese

Going to leave this open as some sort of documentation for those who run down the same thought experiment

blast-hardcheese avatar Oct 20 '21 23:10 blast-hardcheese

Should cross-builds work as well with the guardrail task ? I.e should + guardrail being run in a project produce generated clients and servers under both target/scala-2.13 and target/scala-2.12 in case these are the provided crossScalaVersions in the build.sbt ?

Veske avatar Nov 30 '21 13:11 Veske

@Veske That is expected to work, yes. It looks like the sbt task caching is scoped to target/, not target/scala-* as I expected. PR incoming.

blast-hardcheese avatar Nov 30 '21 18:11 blast-hardcheese

#149

blast-hardcheese avatar Nov 30 '21 18:11 blast-hardcheese

#149

Thank you for that ! I will try it out in the morning.

Veske avatar Nov 30 '21 19:11 Veske

0.69.0.1 was released with that change, thank you

blast-hardcheese avatar Nov 30 '21 23:11 blast-hardcheese