Skip to content

2.13 community build breakage (assorted) #647

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

Closed
SethTisue opened this issue Aug 28, 2019 · 22 comments
Closed

2.13 community build breakage (assorted) #647

SethTisue opened this issue Aug 28, 2019 · 22 comments
Milestone

Comments

@SethTisue
Copy link
Member

this SHA bump: scala/community-build@4b8d9e4

broke a lot of projects in the 2.13 community build, so at e.g. https://scala-ci.typesafe.com/view/scala-2.13.x/job/scala-2.13.x-integrate-community-build/2555/ we see:

FAILED: kind-projector,genjavadoc,silencer,scalameta,scala-async,mercator,grizzled,acyclic,scoverage,scapegoat

failures are as follows

[kind-projector] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/kind-projector-354cad9b82ea009905cc8cbd0a441bf658932b79/src/main/scala/StringParser.scala:11:15: not enough arguments for constructor StoreReporter: (settings: scala.tools.nsc.Settings)scala.tools.nsc.reporters.StoreReporter.
[kind-projector] [error] Unspecified value parameter settings.
[kind-projector] [error]       val r = new StoreReporter()
[kind-projector] [error]               ^
[genjavadoc] --- target/expected_output/basic/akka/actor/Identify.java	2019-08-28 00:59:57.735549981 +0000
[genjavadoc] +++ /tmp/genjavadoc-java463567615557974010/akka/actor/Identify.java	2019-08-28 00:59:57.187561626 +0000
[genjavadoc] @@ -2,30 +2,6 @@
[genjavadoc]  public final class Identify implements scala.Product, java.io.Serializable {
[genjavadoc]    static public  akka.actor.Identify apply (Object messageId)  { throw new RuntimeException(); }
[genjavadoc]    static public  scala.Option<java.lang.Object> unapply (akka.actor.Identify x$0)  { throw new RuntimeException(); }
[genjavadoc] -  static public  boolean apply$mcZD$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  double apply$mcDD$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  float apply$mcFD$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  int apply$mcID$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  long apply$mcJD$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  void apply$mcVD$sp (double v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  boolean apply$mcZF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  double apply$mcDF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  float apply$mcFF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  int apply$mcIF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  long apply$mcJF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  void apply$mcVF$sp (float v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  boolean apply$mcZI$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  double apply$mcDI$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  float apply$mcFI$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  int apply$mcII$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  long apply$mcJI$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  void apply$mcVI$sp (int v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  boolean apply$mcZJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  double apply$mcDJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  float apply$mcFJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  int apply$mcIJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  long apply$mcJJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc] -  static public  void apply$mcVJ$sp (long v1)  { throw new RuntimeException(); }
[genjavadoc]    public  Object messageId ()  { throw new RuntimeException(); }
[genjavadoc]    // not preceding
[silencer] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/silencer-140645bf485ba497ad296784e1b6742237ce0c8e/silencer-plugin/src/main/scala/com/github/ghik/silencer/SuppressingReporter.scala:77:10: value count is not a member of SuppressingReporter.this.Severity
[silencer] [error]     INFO.count = original.INFO.count
[silencer] [error]          ^
[scalameta] [error] Unspecified value parameter settings.
[scalameta] [error] Error occurred in an application involving default arguments.
[scalameta] [error]     val compiler = new Global(settings, new StoreReporter)
c654c46b8617d89bc8772e3f1d92/src/test/scala/scala/async/package.scala:70:20: not enough arguments for constructor StoreReporter: (settings: scala.tools.nsc.Settings)scala.tools.nsc.reporters.StoreReporter.
[scala-async] [error] Unspecified value parameter settings.
[scala-async] [error]     val reporter = new StoreReporter
[scala-async] [error]                    ^
[mercator] [error] ## Exception when compiling 2 sources to /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/mercator-7b0fab5dc6dcaf8ff801c55add75451ed519496b/core/jvm/target/scala-2.13/classes
[mercator] [error] java.lang.NullPointerException
[mercator] [error] scala.reflect.internal.transform.UnCurry.scala$reflect$internal$transform$UnCurry$$expandAlias(UnCurry.scala:42)
[grizzled] [error] java.lang.NullPointerException
[grizzled] [error] 	at scala.reflect.internal.transform.UnCurry.scala$reflect$internal$transform$UnCurry$$expandAlias(UnCurry.scala:42)
[grizzled] [error] 	at scala.reflect.internal.transform.UnCurry$$anon$1.apply(UnCurry.scala:47)
[acyclic] �[32m+�[39m acyclic.CycleTests.fail.halfpackagecycle �[2m90ms�[0m  
[acyclic] �[31mX�[39m acyclic.CycleTests.success.simple �[2m99ms�[0m 
[acyclic]   �[91m�[4mjava.lang.NullPointerException�[39m�[24m
[acyclic]     �[31mscala.reflect.internal.transform.UnCurry.�[91mscala$reflect$internal$transform$UnCurry$$expandAlias�[31m(�[91mUnCurry.scala�[39m:�[91m42�[31m)�[39m
[acyclic]     �[31mscala.reflect.internal.transform.UnCurry$$anon$1.�[91mapply�[31m(�[91mUnCurry.scala�[39m:�[91m47�[31m)�[39m
[acyclic]     �[31mscala.tools.nsc.transform.UnCurry$UnCurryTransformer.�[91mmainTransform�[31m(�[91mUnCurry.scala�[39m:�[91m550�[31m)�[39m
[scoverage] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/scoverage-543e31ff6acf76a743abb0c6d2c3f75461b3532d/scalac-scoverage-plugin/src/test/scala/scoverage/ScoverageCompiler.scala:102:34: ambiguous reference to overloaded definition,
[scoverage] [error] both value reporter in class ScoverageCompiler of type scala.tools.nsc.reporters.Reporter
[scoverage] [error] and  method reporter in class Global of type => scala.tools.nsc.reporters.FilteringReporter
[scoverage] [error] match expected type ?
[scoverage] [error]   def assertNoErrors() = assert(!reporter.hasErrors, "There are compilation errors")
[scoverage] [error]                                  ^
[scoverage] [error] one error found
[scapegoat] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/scapegoat-734c967c7656ed6d3bab4a683798cddc7c9026e4/src/test/scala/com/sksamuel/scapegoat/FeedbackTest.scala:25:24: not enough arguments for constructor StoreReporter: (settings: scala.tools.nsc.Settings)scala.tools.nsc.reporters.StoreReporter.
[scapegoat] [error] Unspecified value parameter settings.
[scapegoat] [error]         val reporter = new StoreReporter
[scapegoat] [error]                        ^
@SethTisue SethTisue changed the title 2.13 community build breakage (compiler internals related) 2.13 community build breakage (assorted) Aug 28, 2019
@SethTisue SethTisue added this to the 2.13.1 milestone Aug 28, 2019
@SethTisue
Copy link
Member Author

@szeiger I'm off Thursday, Friday, and Monday; and I have other things to wrap up tomorrow. can I ask you, as the 2.13.1 release lead, to take next steps here...?

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

I will take a look today

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

scala/scala#8381 should fix kind-projector, scalameta, scala-async, scapegoat (or at least get them to the next issue).

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

The genjavadoc failure is caused by the new phase assembly algorithm, it seems.

I checked out genjavadoc and changed

diff --git a/plugin/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala b/plugin/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala
index 2d7fc59..2550649 100644
--- a/plugin/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala
+++ b/plugin/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala
@@ -30,6 +30,7 @@ trait CompilerSpec {
     val scalac = new GenJavadocCompiler((defaultSettings ++ extraSettings).map{ kv =>
       s"genjavadoc:$kv"
     }, rangepos)
+    println(scalac.global.phaseDescriptions)

     scalac.compile(sources)
     assertFalse("Scala compiler reported errors", scalac.reporter.hasErrors)
diff --git a/plugin/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala b/plugin/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala
index 9c767ee..b282ee4 100644
--- a/plugin/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala
+++ b/plugin/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala
@@ -16,7 +16,7 @@ class GenJavadocCompiler(pluginOptions: Seq[String], rangepos: Boolean) {
   settings.Yrangepos.value = rangepos

   val reporter = new ConsoleReporter(settings)
-  private val global = new Global(settings, reporter) {
+  val global = new Global(settings, reporter) {
     override protected def loadRoughPluginsList() =
       new GenJavadocPlugin(this) :: super.loadRoughPluginsList()
   }

With 2.13.0 i get

       uncurry  10  uncurry, translate function values to anonymous classes
        fields  11  synthesize accessors and fields, add bitmaps for lazy vals
     tailcalls  12  replace tail calls by jumps
    specialize  13  @specialized-driven class and method specialization
    GenJavadoc  14
 explicitouter  15  this refs to outer pointers

with current 2.13.x

       uncurry  10  uncurry, translate function values to anonymous classes
        fields  11  synthesize accessors and fields, add bitmaps for lazy vals
    GenJavadoc  12
     tailcalls  13  replace tail calls by jumps
    specialize  14  @specialized-driven class and method specialization
 explicitouter  15  this refs to outer pointers

Interestingly, it seems the GenJavadoc phase used to be after specialize, now it's before, but in the expected output the specialized methods should not be there. Maybe I confused something, but in any case it seems likely that the change in phase ordering is the cause. @retronym could you take a look?

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

@retronym I'm pretty sure the NPE in UnCurry is also caused by a different phase ordering.

I took https://github.com/bmc/grizzled-scala and used the debugger, with 2.13.0 and 2.13.x. In 2.13.x, UnCurrry sees different trees, where Imports are still there. In 2.13.0, no Import trees get to UnCurry.

Here are the phases:

2.13.0:

           typer   4  the meat and potatoes: type the trees
  superaccessors   5  add super accessors in traits and nested classes
wartremover-t...   6  
      extmethods   7  add extension methods for inline classes
         pickler   8  serialize symbol tables
        xsbt-api   9  
 xsbt-dependency  10  
       refchecks  11  reference/override checking, translate nested objects
          patmat  12  translate match expressions
         uncurry  13  uncurry, translate function values to anonymous classes
          fields  14  synthesize accessors and fields, add bitmaps for lazy vals
       tailcalls  15  replace tail calls by jumps
      specialize  16  @specialized-driven class and method specialization
   explicitouter  17  this refs to outer pointers

2.13.x

           typer   4  the meat and potatoes: type the trees
  superaccessors   5  add super accessors in traits and nested classes
wartremover-t...   6  
      extmethods   7  add extension methods for inline classes
          patmat   8  translate match expressions
         pickler   9  serialize symbol tables
        xsbt-api  10  
 xsbt-dependency  11  
         uncurry  12  uncurry, translate function values to anonymous classes
          fields  13  synthesize accessors and fields, add bitmaps for lazy vals
       tailcalls  14  replace tail calls by jumps
      specialize  15  @specialized-driven class and method specialization
       refchecks  16  reference/override checking, translate nested objects
   explicitouter  17  this refs to outer pointers

@szeiger
Copy link

szeiger commented Aug 28, 2019

@lrytz Can we also add deprecated forwarders for the error counts to fix silencer?

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

(Import trees are dropped in refchecks, which moved to after uncurry)

@szeiger I think silencer might be broken in more ways, taking a look now.

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

For silencer, here's a branch that should make it work with the latest 2.13.x: ghik/silencer@master...lrytz:new-reporters

Test fail with the UnCurry NPE discussed above.

@smarter
Copy link
Member

smarter commented Aug 28, 2019

Why did refchecks move ?

@lrytz
Copy link
Member

lrytz commented Aug 28, 2019

Due to scala/scala#8295 (most likely), it's a regression. patmat says val runsAfter = List("refchecks").

SethTisue added a commit to scala/community-build that referenced this issue Aug 28, 2019
@SethTisue
Copy link
Member Author

I bumped the Scala SHA and kicked off a new build at https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/2557/

@SethTisue
Copy link
Member Author

in run 2557 we see these projects are fixed: kind-projector, scala-async

new failures: splain, atto. atto is the uncurry NPE, splain is

[splain] ** COMMUNITY BUILD LINE COUNT: 1036
[splain] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.16/project-builds/splain-c9318fc6ec941bb726b84e629f0f581aac90dab7/src/main/scala-2.11+/splain/compat.scala:14:54: not enough arguments for method echo: (pos: Compat.this.global.analyzer.global.Position, msg: String)Unit.
[splain] [error] Unspecified value parameter msg.
[splain] [error]   def echo(msg: String) = typer.context.reporter.echo(msg)
[splain] [error]                                                      ^

@lrytz this looks like another case where adding a deprecated variant might be advisable

@lrytz
Copy link
Member

lrytz commented Aug 29, 2019

Sure, scala/scala#8384 scala/scala#8385

@SethTisue
Copy link
Member Author

SethTisue commented Aug 30, 2019

latest failures at https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/2564/ :

  • genjavadoc as above
  • silencer count and resetCount changes, but we should use Lukas's branch instead? @lrytz and/or, is this addressable by adding more deprecated forwarders?
  • mercator UnCurry NPE
  • grizzled UnCurry NPE
  • atto UnCurry NPE
  • acyclic UnCurry NPE
  • scapegoat UnCurry NPE (and maybe other stuff going on as well? not clear)

@lrytz
Copy link
Member

lrytz commented Sep 2, 2019

silencer count and resetCount changes, but we should use Lukas's branch instead? @lrytz and/or, is this addressable by adding more deprecated forwarders?

No, for silencer we should switch to my branch.

@SethTisue
Copy link
Member Author

@SethTisue
Copy link
Member Author

silencer now hits the UnCurry thing instead, that's progress

@lrytz
Copy link
Member

lrytz commented Sep 3, 2019

@lrytz
Copy link
Member

lrytz commented Sep 3, 2019

It seems the genjavadoc issue is still there, I'll take a look...

@lrytz
Copy link
Member

lrytz commented Sep 4, 2019

Fixed silencer (pushed to my branch) and genjavadoc (moved to my branch in scala/community-build@e4de4ef). That's running in https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/2574.

Looking at scoverage next, which also failed due to the changed reporters.

slick failed with a stack overflow / recursion

[slick] 	at scala.reflect.internal.Types$SubType.baseClasses(Types.scala:1096)
[slick] 	at scala.reflect.internal.Types$AbstractTypeRef.baseClasses(Types.scala:2332)
[slick] 	at scala.reflect.internal.Types$AbstractTypeRef.baseClasses$(Types.scala:2332)
[slick] 	at scala.reflect.internal.Types$AbstractNoArgsTypeRef.baseClasses(Types.scala:2720)
[slick] 	at scala.reflect.internal.Types$SubType.baseClasses(Types.scala:1096)
[slick] 	at scala.reflect.internal.Types$AbstractTypeRef.baseClasses(Types.scala:2332)
[slick] 	at scala.reflect.internal.Types$AbstractTypeRef.baseClasses$(Types.scala:2332)
[slick] 	at scala.reflect.internal.Types$AbstractNoArgsTypeRef.baseClasses(Types.scala:2720)
[slick] 	at scala.reflect.internal.Types$SubType.baseClasses(Types.scala:1096)
...
[slick] [error] (testkit/compile:doc) java.lang.StackOverflowError
[slick] [error] (testkit/compile:compileIncremental) java.lang.StackOverflowError

@SethTisue / @szeiger is that one knwon?

@lrytz
Copy link
Member

lrytz commented Sep 4, 2019

Scoverage support in scoverage/scalac-scoverage-plugin#279, updated the project ref in scala/community-build@82969dc

@SethTisue
Copy link
Member Author

this all got addressed

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

No branches or pull requests

4 participants