From f6dd6171fdc5bf7cc66aefcc9e358dd98c6abeaf Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Sat, 19 Aug 2023 17:47:10 -0700 Subject: [PATCH] Remove debug print --- .../surface/CompileTimeSurfaceFactory.scala | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala b/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala index 6d2650d627..01aa78523f 100644 --- a/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala +++ b/airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala @@ -76,8 +76,8 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) { surfaceOf(TypeRepr.of(using tpe)) } - private val seen = scala.collection.mutable.Set[TypeRepr]() - private val memo = scala.collection.mutable.Map[TypeRepr, Expr[Surface]]() + private val seen = scala.collection.mutable.Set[TypeRepr]() + private val memo = scala.collection.mutable.Map[TypeRepr, Expr[Surface]]() private val lazySurface = scala.collection.mutable.Set[TypeRepr]() private def surfaceOf(t: TypeRepr): Expr[Surface] = { @@ -93,10 +93,9 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) { // For debugging // println(s"[${typeNameOf(t)}]\n ${t}\nfull type name: ${fullTypeNameOf(t)}\nclass: ${t.getClass}") val generator = factory.andThen { expr => - if(!lazySurface.contains(t)) { + if (!lazySurface.contains(t)) { expr - } - else { + } else { // Need to cache the recursive Surface to be referenced in a LazySurface val cacheKey = if (typeNameOf(t) == "scala.Any") { t match { @@ -110,8 +109,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) { case _ => fullTypeNameOf(t) } - } - else { + } else { fullTypeNameOf(t) } '{ @@ -706,7 +704,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) { } } val expr = Expr.ofSeq(methodSurfaces) - println(s"methodOf: ${targetType.typeSymbol.fullName} => \n${expr.show}") + // println(s"methodOf: ${targetType.typeSymbol.fullName} => \n${expr.show}") methodMemo += targetType -> expr expr }