From b81c7af27d7e2249efe6106b8a21809b17bf0739 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 23 Feb 2021 13:51:48 -0600 Subject: [PATCH] consolidate scala-3 sources --- build.sbt | 2 +- .../scala-3.0.0-RC1/SourcPosPlatform.scala | 25 ------------------- .../SourcPosPlatform.scala | 0 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 src/main/scala-3.0.0-RC1/SourcPosPlatform.scala rename src/main/{scala-3.0.0-M3 => scala-3}/SourcPosPlatform.scala (100%) diff --git a/build.sbt b/build.sbt index 9318468..7af6ca7 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ lazy val `scala-3.0` = "3.0.0-RC1" lazy val `scala-3.0-prev` = "3.0.0-M3" lazy val `scala-2.12` = "2.12.12" -lazy val `scala-2.13` = "2.13.3" +lazy val `scala-2.13` = "2.13.5" // Publishing name := "sourcepos" diff --git a/src/main/scala-3.0.0-RC1/SourcPosPlatform.scala b/src/main/scala-3.0.0-RC1/SourcPosPlatform.scala deleted file mode 100644 index 877a67c..0000000 --- a/src/main/scala-3.0.0-RC1/SourcPosPlatform.scala +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2020 by Rob Norris -// This software is licensed under the MIT License (MIT). -// For more information see LICENSE or https://opensource.org/licenses/MIT - -package org.tpolecat.sourcepos - -import scala.quoted._ - -trait SourcePosPlatform { - - implicit inline def instance: SourcePos = - ${SourcePosPlatform.sourcePos_impl} - -} - -object SourcePosPlatform { - - def sourcePos_impl(using ctx: Quotes): Expr[SourcePos] = { - val rootPosition = ctx.reflect.Position.ofMacroExpansion - val file = Expr(rootPosition.sourceFile.jpath.toString) - val line = Expr(rootPosition.startLine + 1) - '{SourcePos($file, $line)} - } - -} diff --git a/src/main/scala-3.0.0-M3/SourcPosPlatform.scala b/src/main/scala-3/SourcPosPlatform.scala similarity index 100% rename from src/main/scala-3.0.0-M3/SourcPosPlatform.scala rename to src/main/scala-3/SourcPosPlatform.scala