Skip to content

2.13: new Scala SHA#1164

Merged
SethTisue merged 8 commits intoscala:2.13.xfrom
SethTisue:new-scala-2.13-sha-20200616
Jun 18, 2020
Merged

2.13: new Scala SHA#1164
SethTisue merged 8 commits intoscala:2.13.xfrom
SethTisue:new-scala-2.13-sha-20200616

Conversation

@SethTisue SethTisue self-assigned this Jun 16, 2020
@SethTisue
Copy link
Copy Markdown
Member Author

gah

https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/1545/artifact/logs/akka-stream-build.log

[akka-stream] [error] /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.16/project-builds/akka-stream-ac13d37ddedac945c1f3752ed21602e993de9f2d/akka-stream/src/main/scala/akka/stream/impl/ResizableMultiReaderRingBuffer.scala:9:8: illegal cyclic reference involving object ResizableMultiReaderRingBuffer
[akka-stream] [error] import ResizableMultiReaderRingBuffer._
[akka-stream] [error]        ^

@SethTisue
Copy link
Copy Markdown
Member Author

SethTisue commented Jun 16, 2020

reproducible outside dbuild with some trouble

in the silencer repo you git checkout v1.6.0, sbt, ++2.13.3-bin-db119f9, set every version := "1.6.0", publishLocal

then in akka repo

diff --git project/AkkaDisciplinePlugin.scala project/AkkaDisciplinePlugin.scala
index 0c42b3a8d7..eedd85b16d 100644
--- project/AkkaDisciplinePlugin.scala
+++ project/AkkaDisciplinePlugin.scala
@@ -47,8 +47,8 @@ object AkkaDisciplinePlugin extends AutoPlugin {
     val silencerVersion = "1.6.0"
     Seq(
       libraryDependencies ++= Seq(
-          compilerPlugin(("com.github.ghik" %% "silencer-plugin" % silencerVersion).cross(CrossVersion.patch)),
-          ("com.github.ghik" %% "silencer-lib" % silencerVersion % Provided).cross(CrossVersion.patch)))
+          compilerPlugin(("com.github.ghik" %% "silencer-plugin" % silencerVersion).cross(CrossVersion.full)),
+          ("com.github.ghik" %% "silencer-lib" % silencerVersion % Provided).cross(CrossVersion.full)))

then sbt -J-Dakka.no.discipline=true, ++2.13.3-bin-db119f9, akka-stream/compile

you can work around it with:

--- a/akka-stream/src/main/scala/akka/stream/impl/ResizableMultiReaderRingBuffer.scala
+++ b/akka-stream/src/main/scala/akka/stream/impl/ResizableMultiReaderRingBuffer.scala
@@ -7,8 +7,6 @@ package akka.stream.impl
 import scala.annotation.tailrec
 import scala.util.control.NoStackTrace
 
-import ResizableMultiReaderRingBuffer._
-
 import akka.annotation.InternalApi
 
 /**
@@ -20,7 +18,9 @@ import akka.annotation.InternalApi
 @InternalApi private[akka] class ResizableMultiReaderRingBuffer[T](
     initialSize: Int, // constructor param, not field
     maxSize: Int, // constructor param, not field
-    val cursors: Cursors) {
+    val cursors: ResizableMultiReaderRingBuffer.Cursors) {
+  import ResizableMultiReaderRingBuffer._
+

next step: think about whether this is a regression

@SethTisue
Copy link
Copy Markdown
Member Author

SethTisue commented Jun 17, 2020

curiouser and curiouser: the compilation error goes away if you remove the @InternalApi annotation from object ResizableMultiReaderRingBuffer

but it doesn't have to be that annotation in particular. adding @nowarn or @strictfp also does it

LOL, it boils down to just:

import S._
@annotation.strictfp object S

git bisect says scala/scala#9023 is where this regressed; I'll comment in more detail there

SethTisue added a commit to scalacommunitybuild/akka that referenced this pull request Jun 18, 2020
@SethTisue
Copy link
Copy Markdown
Member Author

another file was hit, akka-stream/src/main/scala-jdk-9/akka/stream/impl/JavaFlowAndRsConverters.scala needed scalacommunitybuild/akka@c5b86ce

the details are a little different — the import was a import Foo.Implicits._, but it worked to just move the import until after object Foo ....

@SethTisue
Copy link
Copy Markdown
Member Author

it seems scala/scala#9023 will be reverted, but for now I worked around it; I'll remove the workarounds in the next round

@SethTisue SethTisue merged commit 197c69a into scala:2.13.x Jun 18, 2020
@SethTisue SethTisue deleted the new-scala-2.13-sha-20200616 branch June 18, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant