Skip to content
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

2.13: new Scala SHA #1400

Merged
merged 14 commits into from May 11, 2021
Merged

Conversation

@SethTisue
Copy link
Member Author

everything is green except zinc

https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/2680/artifact/logs/zinc-build.log

[zinc] [error] java.lang.AssertionError: assertion failed: 
[zinc] [error]   x1.isInstanceOf[xsbti.ScalaProvider with sbt.internal.inc.ScalaInstance.ScalaProvider2 @unchecked]
[zinc] [error]      while compiling: /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/internal/zinc-classpath/src/main/scala/sbt/internal/inc/ScalaInstance.scala
[zinc] [error]         during phase: patmat
[zinc] [error]      library version: version 2.13.6-bin-1c77d74
[zinc] [error]     compiler version: version 2.13.6-bin-1c77d74
[zinc] [error]   reconstructed args: -bootclasspath /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.dbuild/scala/3d59735ea2b84a993f7d3fa11b7a2483d1eaed42/lib/scala-library.jar -deprecation -encoding utf8 -feature -unchecked -Wconf:cat=deprecation:w -Wconf:cat=unchecked:w -Wconf:cat=feature:w -Wconf:cat=deprecation:ws -Wconf:cat=feature:ws -Wconf:cat=optimizer:ws -Wdead-code -Wvalue-discard -Wnumeric-widen -Wunused:imports -Wunused:privates -Wunused:locals -Wunused:implicits -Wunused:nowarn -Xlint:adapted-args -Xlint:nullary-unit -Xlint:inaccessible -Xlint:infer-any -Xlint:missing-interpolator -Xlint:doc-detached -Xlint:private-shadow -Xlint:type-parameter-shadow -Xlint:poly-implicit-overload -Xlint:option-implicit -Xlint:delayedinit-select -Xlint:package-object-classes -Xlint:stars-align -Xlint:strict-unsealed-patmat -Xlint:constant -Xlint:unused -Xlint:nonlocal-return -Xlint:implicit-not-found -Xlint:serial -Xlint:valpattern -Xlint:eta-zero -Xlint:eta-sam -Xlint:deprecation -Xlint:byname-implicit -Xlint:recurse-with-default -Xlint:unit-special -Xlint:multiarg-infix -Xlint:implicit-recursion -classpath /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/internal/zinc-classpath/target/jvm-2.13/classes:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/internal/compiler-interface/target/jvm/compiler-interface-3.11.4.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/./target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.dbuild/local-repo/0/org/scala-lang/scala-compiler/2.13.6-bin-1c77d74/scala-compiler-2.13.6-bin-1c77d74.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/org/scala-sbt/launcher-interface/1.1.3/launcher-interface-1.1.3.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/./target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.dbuild/local-repo/0/org/scala-sbt/io/1.4.0-dbuildxe2c2be41f4f53e6f124f8f3a399171888545df66/io-1.4.0-dbuildxe2c2be41f4f53e6f124f8f3a399171888545df66.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/org/scala-sbt/util-interface/1.5.0/util-interface-1.5.0.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/./target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.dbuild/local-repo/0/org/scala-lang/scala-reflect/2.13.6-bin-1c77d74/scala-reflect-2.13.6-bin-1c77d74.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/org/jline/jline/3.19.0/jline-3.19.0.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/com/swoval/file-tree-views/2.1.6/file-tree-views-2.1.6.jar:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.sbt/matrix/zincClasspathJVM2_13/.dbuild/ivy2/coursier-cache/https/scala-ci.typesafe.com/artifactory/dbuild/net/java/dev/jna/jna-platform/5.5.0/jna-platform-5.5.0.jar -language:higherKinds -language:implicitConversions -Xplugin:/home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/./target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/.dbuild/local-repo/0/com/lightbend/cloc-plugin/0.0.1-dbuildx20eb1ca170915b0c483795c1f28674226acf0b89/cloc-plugin-0.0.1-dbuildx20eb1ca170915b0c483795c1f28674226acf0b89.jar -Yno-flat-classpath-cache -Xfuture
[zinc] [error] 
[zinc] [error]   last tree to typer: TypeTree(class Tuple2)
[zinc] [error]        tree position: line 208 of /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/zinc-23fd3893242fe0c7b377620e06d8ffa78ccac3e4/internal/zinc-classpath/src/main/scala/sbt/internal/inc/ScalaInstance.scala
[zinc] [error]             tree tpe: (ClassLoader, ClassLoader)
[zinc] [error]               symbol: (final case) class Tuple2 in package scala
[zinc] [error]    symbol definition: final case class Tuple2[+T1, +T2] extends Product2[T1,T2] with Product with Serializable (a ClassSymbol)
[zinc] [error]       symbol package: scala
[zinc] [error]        symbol owners: class Tuple2
[zinc] [error]            call site: method apply in object ScalaInstance in package inc
[zinc] [error] 
[zinc] [error] == Source file context for tree position ==
[zinc] [error] 
[zinc] [error]    205     }
[zinc] [error]    206     // sbt launcher 1.0.3 will construct layered classloader. Use them if we find them.
[zinc] [error]    207     // otherwise, construct layered loaders manually.
[zinc] [error]    208     val (loader, loaderLibraryOnly) = {
[zinc] [error]    209       (try {
[zinc] [error]    210         provider match {
[zinc] [error]    211           case p: ScalaProvider2 @unchecked => Option((provider.loader, p.loaderLibraryOnly))
[zinc] [error] 	at scala.reflect.internal.SymbolTable.throwAssertionError(SymbolTable.scala:170)
[zinc] [error] 	at scala.tools.nsc.transform.patmat.MatchTreeMaking$TreeMakers$TypeTestTreeMaker$treeCondStrategy$.withOuterTest(MatchTreeMaking.scala:372)
...

@SethTisue
Copy link
Member Author

@lrytz @dwijnand @eed3si9n anyone have any insight into this? might this be a real issue?

@dwijnand
Copy link
Member

Dang. Good boy, community build. Seems something's wrong in scala/scala#9504. Ignoring the confusing "tree type is Tuple2" I think the problem is that xsbti.ScalaProvider with sbt.internal.inc.ScalaInstance.ScalaProvider2 @unchecked isn't a RefinedType, but the type symbol is. I guess .dealias isn't enough, we need a .unannotate...

Also reminds me of this diff where the use of @unchecked on the type was dropped: akka/akka#30072 (comment)

dwijnand added a commit to dwijnand/scala that referenced this pull request Apr 26, 2021
Fixes scala/community-build#1400

(Running the "alt" version gives you "java.lang.NoSuchMethodException:
Test$$anon$1.loaderLibraryOnly()" (bug 2) and the result isn't the one
it should be... (bug 3)...)
dwijnand added a commit to dwijnand/scala that referenced this pull request Apr 26, 2021
Fixes scala/community-build#1400

(Running the "alt" version gives you "java.lang.NoSuchMethodException:
Test$$anon$1.loaderLibraryOnly()" (bug 2) and the result isn't the one
it should be... (bug 3)...)
@lrytz
Copy link
Member

lrytz commented May 6, 2021

🙄

@SethTisue SethTisue assigned SethTisue and unassigned dwijnand May 6, 2021
@SethTisue
Copy link
Member Author

SethTisue commented May 6, 2021

@dwijnand there is a new regression, and git bisect identifies scala/scala#9581 as the cause. compilation of kind-projector hangs. the problem is reproducible outside dbuild just by cloning kind-projector and running ++2.13.6-bin-d4dd00e followed by Test/compile

@som-snytt
Copy link

@SethTisue wait, rebasing my own repo closed arbitrary tickets? how is that possible?

@SethTisue
Copy link
Member Author

rebasing my own repo closed arbitrary tickets? how is that possible?

I assume it's only possible because you have write rights here, but that doesn't eliminate the amazement factor. I might expect this in-org, but would not expect it from a personal fork, even a bigwig's fork.

@SethTisue
Copy link
Member Author

SethTisue commented May 9, 2021

@dwijnand the problem is specific to this source file: https://github.com/typelevel/kind-projector/blob/main/src/test/scala/hmm.scala ; note the presence of extremely nested types

the top of the stack trace in the thread dump is

"pool-8-thread-3" #160 prio=5 os_prio=31 tid=0x00007fb9ab26e800 nid=0x1360f runnable [0x0000700011f73000]
   java.lang.Thread.State: RUNNABLE
	at scala.reflect.api.Trees$Transformer.enclosingClass$1(Trees.scala:2580)
	at scala.reflect.api.Trees$Transformer.currentClass(Trees.scala:2581)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$1.$anonfun$apply$1(ExplicitOuter.scala:496)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$1$$Lambda$5379/987047237.apply(Unknown Source)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:806)
	at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2371)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:806)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:805)
	at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2380)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:806)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:805)
	at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2380)
	at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:806)
	at scala.reflect.internal.Types$Type.map(Types.scala:807)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$1.apply(ExplicitOuter.scala:495)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$1.apply(ExplicitOuter.scala:494)
	at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2380)

@SethTisue
Copy link
Member Author

SethTisue commented May 9, 2021

@dwijnand Slick has the same (well, presumably the same) issue, in the testkit subproject. so once there's a fix for kind-projector, we should test it on Slick

@SethTisue
Copy link
Member Author

SethTisue commented May 11, 2021

repos needing override-as-private-this adjustments (as per scala/scala#9542): sbt-io, http4s

@SethTisue
Copy link
Member Author

[sttp] [error] /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/sttp-7e54fbfc42d10ff169ef66b31619abe9bb140930/armeria-backend/src/main/scala/sttp/client3/armeria/HttpDecodingClient.scala:14:13: cannot override final member:
[sttp] [error] final def as[U](type: Class[U]): U (defined in class AbstractUnwrappable)
[sttp] [error]   with <defaultmethod> def as[T](type: Class[T]): T (defined in trait Client);
[sttp] [error]  other members with override errors are: unwrap
[sttp] [error] final class HttpDecodingClient(delegate: HttpClient) extends SimpleDecoratingHttpClient(delegate) {
[sttp] [error]             ^
...
[sttp] [error] /home/jenkins/workspace/scala-2.13.x-jdk11-integrate-community-build/target-0.9.17/project-builds/sttp-7e54fbfc42d10ff169ef66b31619abe9bb140930/armeria-backend/src/main/scala/sttp/client3/armeria/HttpDecodingClient.scala:46:21: cannot override final member:
[sttp] [error] final def whenComplete(): java.util.concurrent.CompletableFuture[Void] (defined in class FilteredStreamMessage)
[sttp] [error]   with <defaultmethod> def whenComplete(): java.util.concurrent.CompletableFuture[_] (defined in trait Response)
[sttp] [error] private final class HttpDecodedResponse(
[sttp] [error]                     ^
[sttp] [error] two errors found

@SethTisue
Copy link
Member Author

I'll follow up on the sttp thing, but in the meantime, merging anyway.

@SethTisue SethTisue merged commit f544b66 into scala:2.13.x May 11, 2021
@SethTisue SethTisue deleted the new-scala-2.13-sha-20210420 branch May 11, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants