Skip to content

Commit

Permalink
Merge branch 'master-3.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
rssh committed Jul 11, 2024
2 parents 69a289b + 93b4605 commit 27a1ddd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
10 changes: 7 additions & 3 deletions compiler-plugin/src/test/scala/cc/Test22cc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Test22cc {
}

@Test
@Ignore // In process now
//@Ignore // In process now
def testCompileJSAsyncWithInternalCpsAsync() = {

val inDir = "testdata/set22cc/m2"
Expand All @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion shared/src/main/scala/cps/Async.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* dotty-cps-async: https://github.com/rssh/dotty-cps-async
*
* (C) Ruslan Shevchenko <[email protected]>, Kyiv, 2020, 2021, 2022, 2023
* (C) Ruslan Shevchenko <[email protected]>, Kyiv, 2020, 2021, 2022, 2023, 2024
*/
package cps

Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/scala/cps/plugin/PluginEntryPoints.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
???

Expand Down

0 comments on commit 27a1ddd

Please sign in to comment.