From 93b4605ab044b84b39d370b2f5aeca93ffefeb62 Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Thu, 11 Jul 2024 15:30:37 +0300 Subject: [PATCH] enabled Test22c with disabled -Ycheck:all --- .../src/main/scala/cps/plugin/DebugSettings.scala | 1 - compiler-plugin/src/test/scala/cc/Test22cc.scala | 10 +++++++--- shared/src/main/scala/cps/Async.scala | 2 +- .../src/main/scala/cps/plugin/PluginEntryPoints.scala | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/compiler-plugin/src/main/scala/cps/plugin/DebugSettings.scala b/compiler-plugin/src/main/scala/cps/plugin/DebugSettings.scala index a963660ce..a4a838653 100644 --- a/compiler-plugin/src/main/scala/cps/plugin/DebugSettings.scala +++ b/compiler-plugin/src/main/scala/cps/plugin/DebugSettings.scala @@ -64,7 +64,6 @@ object DebugSettings { pluginSettings.printCode || { val oldPrintCodeTpe = Symbols.requiredClass("cps.macros.flags.PrintCode").typeRef val printCodeTpe = Symbols.requiredClass("cps.plugin.settings.PrintCode").typeRef - println(s"context = ${summon[Context].tree.show}, phase = ${summon[Context].phase}") CpsTransformHelper.findImplicitInstance(printCodeTpe, summon[Context].tree.span).isDefined || CpsTransformHelper.findImplicitInstance(oldPrintCodeTpe, summon[Context].tree.span).isDefined } diff --git a/compiler-plugin/src/test/scala/cc/Test22cc.scala b/compiler-plugin/src/test/scala/cc/Test22cc.scala index 95c939586..0adecab0d 100644 --- a/compiler-plugin/src/test/scala/cc/Test22cc.scala +++ b/compiler-plugin/src/test/scala/cc/Test22cc.scala @@ -28,7 +28,7 @@ class Test22cc { } @Test - @Ignore // In process now + //@Ignore // In process now def testCompileJSAsyncWithInternalCpsAsync() = { val inDir = "testdata/set22cc/m2" @@ -37,8 +37,12 @@ class Test22cc { val dotcInvocations = new DotcInvocations(silent = false, scalaJs = true) - val reporter = dotcInvocations.compileFilesInDirs(List(inDir), outDir, checkAll = true, - extraArgs = List("-Vprint:erasure,rssh.cps", "-experimental", "-P:rssh.cps:printCode"), + // checkAll disabled due to https://github.com/scala/scala3/issues/21119 + val reporter = dotcInvocations.compileFilesInDirs(List(inDir), outDir, checkAll = false, + extraArgs = List( //"-Vprint:erasure,rssh.cps", + "-experimental", + // "-P:rssh.cps:printCode" + ), usePlugin = true ) diff --git a/shared/src/main/scala/cps/Async.scala b/shared/src/main/scala/cps/Async.scala index db07f6671..076ba6e92 100644 --- a/shared/src/main/scala/cps/Async.scala +++ b/shared/src/main/scala/cps/Async.scala @@ -1,7 +1,7 @@ /* * dotty-cps-async: https://github.com/rssh/dotty-cps-async * - * (C) Ruslan Shevchenko , Kyiv, 2020, 2021, 2022, 2023 + * (C) Ruslan Shevchenko , Kyiv, 2020, 2021, 2022, 2023, 2024 */ package cps diff --git a/shared/src/main/scala/cps/plugin/PluginEntryPoints.scala b/shared/src/main/scala/cps/plugin/PluginEntryPoints.scala index 287b7d8cb..f90b6430c 100644 --- a/shared/src/main/scala/cps/plugin/PluginEntryPoints.scala +++ b/shared/src/main/scala/cps/plugin/PluginEntryPoints.scala @@ -9,11 +9,11 @@ import scala.annotation.compileTimeOnly /** * Placehodler, which delegate async transformation to compiler plugin */ -@compileTimeOnly("this call shpuldbe eliminated by cpsPlugin") +@compileTimeOnly("this call should be eliminated by cpsPlugin") def cpsAsyncApply[F[_],T,C <: CpsMonadContext[F]](am: CpsMonad.Aux[F,C], f: C ?=> T): F[T] = ??? -@compileTimeOnly("this call shpuldbe eliminated by cpsPlugin") +@compileTimeOnly("this call should be eliminated by cpsPlugin") def cpsAsyncStreamApply[R, F[_], T, C <: CpsMonadContext[F]](absorber: CpsAsyncEmitAbsorber.Aux[R,F,C,T], f: C ?=> CpsAsyncEmitter[F,T] => Unit): R = ???