Skip to content

Remove depreciated quoted.matching package #8917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion community-build/community-projects/dotty-cps-async
Submodule dotty-cps-async updated 36 files
+0 −1 src/main/scala/cps/Async.scala
+0 −2 src/main/scala/cps/AsyncMacroFlags.scala
+0 −2 src/main/scala/cps/TransformationContext.scala
+0 −1 src/main/scala/cps/forest/ApplyTransform.scala
+0 −1 src/main/scala/cps/forest/ApplyTreeTransform.scala
+0 −1 src/main/scala/cps/forest/AssignTransform.scala
+0 −1 src/main/scala/cps/forest/AwaitTransform.scala
+0 −1 src/main/scala/cps/forest/AwaitTransformOtherMonad.scala
+0 −1 src/main/scala/cps/forest/AwaitTreeTransform.scala
+0 −1 src/main/scala/cps/forest/BlockTransform.scala
+0 −1 src/main/scala/cps/forest/ConstTransform.scala
+0 −1 src/main/scala/cps/forest/IdentTransform.scala
+0 −1 src/main/scala/cps/forest/IfTransform.scala
+0 −1 src/main/scala/cps/forest/ImportTransform.scala
+0 −1 src/main/scala/cps/forest/InlinedTransform.scala
+0 −1 src/main/scala/cps/forest/KnownTreeFragments.scala
+0 −1 src/main/scala/cps/forest/LambdaTreeTransform.scala
+0 −1 src/main/scala/cps/forest/MatchTreeTransform.scala
+0 −1 src/main/scala/cps/forest/NewTransform.scala
+0 −1 src/main/scala/cps/forest/ReturnTransform.scala
+0 −1 src/main/scala/cps/forest/RootTreeTransform.scala
+0 −1 src/main/scala/cps/forest/SelectTreeTransform.scala
+0 −1 src/main/scala/cps/forest/SuperTransform.scala
+0 −1 src/main/scala/cps/forest/ThisTransform.scala
+0 −1 src/main/scala/cps/forest/ThrowTransform.scala
+0 −1 src/main/scala/cps/forest/TransformUtil.scala
+0 −1 src/main/scala/cps/forest/TreeTransformScope.scala
+0 −1 src/main/scala/cps/forest/TryTransform.scala
+0 −1 src/main/scala/cps/forest/TypeApplyTransform.scala
+0 −1 src/main/scala/cps/forest/TypeApplyTreeTransform.scala
+0 −1 src/main/scala/cps/forest/TypedTransform.scala
+0 −1 src/main/scala/cps/forest/ValDefTransform.scala
+0 −1 src/main/scala/cps/forest/WhileTransform.scala
+0 −1 src/main/scala/cps/macroFlags/TypeMarkers.scala
+0 −1 src/test/scala/cps/A3.scala
+0 −1 src/test/scala/cps/cbs2/TestCBS2.scala
2 changes: 1 addition & 1 deletion docs/docs/reference/metaprogramming/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Here’s a compiler that maps an expression given in the interpreted
language to quoted Scala code of type `Expr[Int]`.
The compiler takes an environment that maps variable names to Scala `Expr`s.
```scala
import scala.quoted.{given _, _}
import scala.quoted._

def compile(e: Exp, env: Map[String, Expr[Int]])(using QuoteContext): Expr[Int] = e match {
case Num(n) =>
Expand Down
26 changes: 0 additions & 26 deletions library/src/scala/quoted/matching/ConstSeq.scala

This file was deleted.

25 changes: 0 additions & 25 deletions library/src/scala/quoted/matching/ValueSeq.scala

This file was deleted.

32 changes: 0 additions & 32 deletions library/src/scala/quoted/matching/package.scala

This file was deleted.

1 change: 0 additions & 1 deletion library/src/scala/util/FromDigits.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package scala.util
import scala.math.{BigInt}
import quoted._
import quoted.matching._
import internal.Chars.digit2int
import annotation.internal.sharable

Expand Down
1 change: 0 additions & 1 deletion tests/disabled/run/xml-interpolation-3/XmlQuote_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.tasty.Tasty
import scala.quoted.autolift

import scala.language.implicitConversions
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/i6976.check
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
| ^^^^^^^^^
| Exception occurred while executing macro expansion.
| scala.MatchError: Inlined(EmptyTree,List(),Literal(Constant(2))) (of class dotty.tools.dotc.ast.Trees$Inlined)
| at playground.macros$.mcrImpl(Macro_1.scala:12)
| at playground.macros$.mcrImpl(Macro_1.scala:10)
|
| This location contains code that was inlined from Test_2.scala:5
6 changes: 2 additions & 4 deletions tests/neg-macros/i6976/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package playground

import scala.quoted._, scala.quoted.matching._
import scala.quoted.{given _}
import scala.tasty._
import scala.quoted._

object macros {
inline def mcr(x: => Any) = ${mcrImpl('x)}

def mcrImpl(body: Expr[Any])(using ctx: QuoteContext) : Expr[Any] = {
import ctx.tasty.{_, given _}
import ctx.tasty._
body.unseal match { case Block(_, _) => '{2} }
}
}
2 changes: 1 addition & 1 deletion tests/neg/i6762.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scala.quoted.{_, given _}
import scala.quoted._

type G[X]
case class Foo[T](x: T)
Expand Down
2 changes: 1 addition & 1 deletion tests/neg/i6997b.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package playground

import scala.quoted.{_, given _}, scala.quoted.matching._
import scala.quoted._

inline def mcr(x: => Any): Any = ${mcrImpl('x)}

Expand Down
2 changes: 1 addition & 1 deletion tests/neg/i7048e.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scala.quoted.{given _, _}
import scala.quoted._

abstract class Test {
type T
Expand Down
2 changes: 1 addition & 1 deletion tests/neg/i7618.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package macros

import scala.quoted.{given _, _}
import scala.quoted._

enum Exp {
case Num(n: Int)
Expand Down
2 changes: 1 addition & 1 deletion tests/neg/i7618b.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package macros

import scala.quoted.{given _, _}
import scala.quoted._

enum Exp {
case Num(n: Int)
Expand Down
1 change: 0 additions & 1 deletion tests/neg/i7698.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.matching._

trait Show[T] {
def show(x: T): String
Expand Down
1 change: 0 additions & 1 deletion tests/neg/toexproftuple.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._, scala.deriving._
import scala.quoted.{given _}

inline def mcr: Any = ${mcrImpl}
def mcrImpl(using ctx: QuoteContext): Expr[Any] = {
Expand Down
3 changes: 1 addition & 2 deletions tests/pos-macros/i7011/Macros_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._, scala.quoted.matching._
import scala.quoted.{given _}
import scala.quoted._

inline def mcr(body: => Any): Unit = ${mcrImpl('body)}

Expand Down
2 changes: 1 addition & 1 deletion tests/pos-macros/treemap-unapply/Macro.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scala.quoted.{ given _, _ }
import scala.quoted._

inline def mcr(x: => Unit): Unit = ${mcrImpl('x)}
def mcrImpl(x: Expr[Unit])(using ctx: QuoteContext) : Expr[Unit] =
Expand Down
2 changes: 1 addition & 1 deletion tests/pos/i6997c.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package playground

import scala.quoted.{_, given _}, scala.quoted.matching._
import scala.quoted._

inline def mcr(x: => Any): Any = ${mcrImpl('x)}

Expand Down
2 changes: 1 addition & 1 deletion tests/pos/i7048e.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scala.quoted.{given _, _}
import scala.quoted._

abstract class Test {
type T
Expand Down
2 changes: 0 additions & 2 deletions tests/pos/i8651b.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ abstract class Coroutine[+T] {
object Macros {

import scala.quoted._
import scala.quoted.matching._


inline def coroutine[T](inline body: Any): Coroutine[T] = ${ coroutineImpl('{body}) }

Expand Down
1 change: 0 additions & 1 deletion tests/pos/quoted-pattern-type.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.tasty.Reflection

object Lib {

Expand Down
2 changes: 1 addition & 1 deletion tests/pos/scala2-macro-compat-1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object LineNumberMacro2 {
object LineNumberMacro3 {
import scala.quoted._
def thisLineNumberExpr(using qctx: QuoteContext): Expr[Int] = {
import qctx.tasty.{_, given _}
import qctx.tasty._
Expr(rootPosition.startLine + 1)
}
}
1 change: 0 additions & 1 deletion tests/pos/toexproftuple.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._, scala.deriving._
import scala.quoted.{given _}

inline def mcr: Any = ${mcrImpl}
def mcrImpl(using ctx: QuoteContext): Expr[Any] = {
Expand Down
1 change: 0 additions & 1 deletion tests/run-macros/i6765-b/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.{given _}

inline def foo = ${fooImpl}

Expand Down
1 change: 0 additions & 1 deletion tests/run-macros/i6765-c/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.{given _}

inline def foo(inline n: Int) = ${fooImpl('n)}

Expand Down
1 change: 0 additions & 1 deletion tests/run-macros/i6765/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.{given _}

inline def foo = ${fooImpl}

Expand Down
4 changes: 1 addition & 3 deletions tests/run-macros/i7008/macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import scala.quoted._, scala.quoted.matching._
import scala.quoted.{given _}
import scala.tasty._
import scala.quoted._

case class Box[T](v: T)

Expand Down
2 changes: 1 addition & 1 deletion tests/run-macros/i7715/Macros_1.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scala.quoted.{ given _, _ }
import scala.quoted._

inline def mcr(e: => Any): Any = ${mcrImpl('e)}
def mcrImpl(e: Expr[Any])(using ctx: QuoteContext): Expr[Any] =
Expand Down
2 changes: 0 additions & 2 deletions tests/run-macros/quote-matching-optimize-2/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import scala.quoted._
import scala.quoted.autolift

import scala.tasty.Reflection

object Macro {

inline def optimize[T](inline x: T): Any = ${ Macro.impl('x) }
Expand Down
2 changes: 0 additions & 2 deletions tests/run-macros/quote-matching-optimize-3/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import scala.quoted._
import scala.quoted.autolift

import scala.tasty.Reflection

object Macro {

inline def optimize[T](inline x: T): Any = ${ Macro.impl('x) }
Expand Down
1 change: 0 additions & 1 deletion tests/run-macros/quote-toExprOfSeq/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.{given _}

inline def seq = ${fooImpl}

Expand Down
2 changes: 1 addition & 1 deletion tests/run-macros/tasty-tree-map/quoted_1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object Macros {
implicit inline def identityMaped[T](x: => T): T = ${ impl('x) }

def impl[T: Type](x: Expr[T])(using qctx: QuoteContext) : Expr[T] = {
import qctx.tasty.{_, given _}
import qctx.tasty.{_, given _} // FIXME: #8919
val identityMap = new TreeMap { }
val transformed = identityMap.transformTerm(x.unseal).seal.cast[T]
transformed
Expand Down
3 changes: 1 addition & 2 deletions tests/run-staging/i6992/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import scala.quoted._, scala.quoted.matching._
import scala.quoted._
import scala.quoted.staging._
import scala.quoted.{given _}

given Toolbox = Toolbox.make(getClass.getClassLoader)

Expand Down
1 change: 0 additions & 1 deletion tests/run-staging/quote-function-applied-to.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.quoted._
import scala.quoted.{given _}
import scala.quoted.staging._

object Test {
Expand Down