diff --git a/README.md b/README.md index 7156da7..5b10eb9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a Scala micro-library that provides: The intent is that you can use this instead of `TypeTag` or other heavy machinery. -TypeName is compiled for Scala **2.12**, **2.13**, **3.0.0-M1**, and **3.0.0-M2**. +TypeName is compiled for Scala **2.12**, **2.13**, **3.0.0** (see release notes for exact versions). ```scala diff --git a/build.sbt b/build.sbt index 4d91606..e57407b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,9 +1,9 @@ // Our Scala versions. -lazy val `scala-3.0` = "3.0.0-M2" -lazy val `scala-3.0-prev` = "3.0.0-M1" +lazy val `scala-3.0` = "3.0.0-M3" +lazy val `scala-3.0-prev` = "3.0.0-M2" lazy val `scala-2.12` = "2.12.12" -lazy val `scala-2.13` = "2.13.3" +lazy val `scala-2.13` = "2.13.4" // Publishing name := "typename" @@ -35,7 +35,7 @@ Compile / doc / scalacOptions ++= Seq( ) // MUnit -libraryDependencies += "org.scalameta" %% "munit" % "0.7.19" % Test +libraryDependencies += "org.scalameta" %% "munit" % "0.7.20" % Test testFrameworks += new TestFramework("munit.Framework") // Scala 2 needs scala-reflect diff --git a/project/build.properties b/project/build.properties index c19c768..d91c272 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.2 +sbt.version=1.4.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index a4445c1..76e7d10 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,10 @@ -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.8.0") +addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.9.1") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.1") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.12") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1") diff --git a/src/main/scala-3.0.0-M1/TypeNamePlatform.scala b/src/main/scala-3.0.0-M3/TypeNamePlatform.scala similarity index 58% rename from src/main/scala-3.0.0-M1/TypeNamePlatform.scala rename to src/main/scala-3.0.0-M3/TypeNamePlatform.scala index 7e413f1..6f6c795 100644 --- a/src/main/scala-3.0.0-M1/TypeNamePlatform.scala +++ b/src/main/scala-3.0.0-M3/TypeNamePlatform.scala @@ -8,15 +8,14 @@ import scala.quoted._ trait TypeNamePlatform { - inline given [A] as TypeName[A] = + inline given [A]: TypeName[A] = ${TypeNamePlatform.impl[A]} } object TypeNamePlatform { - // https://users.scala-lang.org/t/obtaining-the-name-of-a-type-scala-3/6902/7 - def impl[A](using t: Type[A], ctx: QuoteContext): Expr[TypeName[A]] = - '{TypeName[A](${Expr(t.show)})} + def impl[A](using t: Type[A], ctx: Quotes): Expr[TypeName[A]] = + '{TypeName[A](${Expr(Type.show[A])})} }