This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re : RC2 bugs on specs

No replies
etorreborre
Joined: 2008-09-03,
User offline. Last seen 1 year 22 weeks ago.
Hi, I was able to isolate the second bug (the stackoverflow error), see ticket #2733. The compiler fails on:
List(List("a")) match { case List(List("a"),List("b", "a", "c"),List("a", "c", "b")) => true }
 and the failure is very dependent on the values being tried in the match expression.
Eric.
----------------------------------------------
Eric TORREBORRE
T +61 411 707 402
E etorreborre@yahoo.com
B http://etorreborre.blogspot.com
P http://specs.googlecode.com
----------------------------------------------

De : Eric Torreborre <etorreborre@yahoo.com>
À : scala-internals@listes.epfl.ch
Envoyé le : Dim 29 Novembre 2009, 22 h 13 min 49 s
Objet : RC2 bugs on specs

Hi all,
I sent a few days ago an email to Antonio Cunei about a compiler crash on specs:
> java.lang.Error: no-symbol does not have owner        at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:2028)        at scala.tools.nsc.symtab.Types$Type.memberType(Types.scala:528)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1$$anonfun$5.apply(RefChecks.scala:144)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1$$anonfun$5.apply(RefChecks.scala:144)        at scala.tools.nsc.symtab.Symbols$Symbol.filter(Symbols.scala:1082)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1.apply(RefChecks.scala:143)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1.apply(RefChecks.scala:140)        at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:88)        at scala.collection.immutable.List.foreach(List.scala:29)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.addVarargBridges(RefChecks.scala:140)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1089)        at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1556)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1446)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1445)        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1580)        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1444)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1148)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:877)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$8.apply(RefChecks.scala:795)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$8.apply(RefChecks.scala:795)        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:170)        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:170)        at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:88)        at scala.collection.immutable.List.foreach(List.scala:29)        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:170)        at scala.collection.immutable.List.flatMap(List.scala:29)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:795)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1440)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1440)        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1580)        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1439)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1148)        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1573)        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:31)        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:306)        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:284)        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:284)        at scala.collection.Iterator$class.foreach(Iterator.scala:553)        at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:285)        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:284)        at scala.tools.nsc.Global$Run.compileSources(Global.scala:773)        at scala.tools.nsc.Global$Run.compile(Global.scala:863)
> However I need more time to isolate it. After my first tries I had the impression that it was related to some inheritance scenario where I have
> abstract class BaseSpecification extends BaseSpecification with ThisAndThat> class Specification extends BaseSpecification with OtherStuff> trait MySpec extends Specification with MoreStuff
> and I had the impression that changing the latest declaration to > class MySpec extends Specification with MoreStuff> was ok. But again I need more time to understand what's wrong.
Before trying to reduce it, I tried to change the "trait" declarations extending "Specification" with class extension or self-types. Unfortunately I just hit another bug:
java.lang.StackOverflowError        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3809)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:3225)        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:3225)        at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:707)        at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3225)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3839)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4040)        at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:2995)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3720)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4040)        at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:3000)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3720)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1844)        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3684)        at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:615)        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:614)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3982)        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4040)        at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:3000)

Which I need to reduce also,...  And since this takes a long time (like a dichotomic search on my test sources), I'm making very slow progress so please bear with me.
Thanks, 
Eric.
----------------------------------------------
Eric TORREBORRE
T +61 411 707 402
E etorreborre@yahoo.com
B http://etorreborre.blogspot.com
P http://specs.googlecode.com
----------------------------------------------

De : Eric Torreborre <etorreborre@yahoo.com>
À : Antonio Cunei <antonio.cunei@epfl.ch>
Envoyé le : Ven 27 Novembre 2009, 16 h 13 min 01 s
Objet : Re : [scala-internals] Scala Meeting report, 2009-11-24

Hi Tony,
> - We'll release a Beta1-RC2, non-optimized, and tell people to test their code and let us know whether we can go ahead and release RC3 optimized.
 I have a compiler error with specs and RC2:
java.lang.Error: no-symbol does not have owner        at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:2028)        at scala.tools.nsc.symtab.Types$Type.memberType(Types.scala:528)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1$$anonfun$5.apply(RefChecks.scala:144)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1$$anonfun$5.apply(RefChecks.scala:144)        at scala.tools.nsc.symtab.Symbols$Symbol.filter(Symbols.scala:1082)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1.apply(RefChecks.scala:143)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$addVarargBridges$1.apply(RefChecks.scala:140)        at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:88)        at scala.collection.immutable.List.foreach(List.scala:29)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.addVarargBridges(RefChecks.scala:140)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1089)        at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1556)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1446)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1445)        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1580)        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1444)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1148)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:877)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$8.apply(RefChecks.scala:795)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$8.apply(RefChecks.scala:795)        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:170)        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:170)        at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:88)        at scala.collection.immutable.List.foreach(List.scala:29)        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:170)        at scala.collection.immutable.List.flatMap(List.scala:29)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:795)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1440)        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1440)        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1580)        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1439)        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1148)        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1573)        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:31)        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:306)        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:284)        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:284)        at scala.collection.Iterator$class.foreach(Iterator.scala:553)        at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:285)        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:284)        at scala.tools.nsc.Global$Run.compileSources(Global.scala:773)        at scala.tools.nsc.Global$Run.compile(Global.scala:863)
However I need more time to isolate it. After my first tries I had the impression that it was related to some inheritance scenario where I have
abstract class BaseSpecification extends BaseSpecification with ThisAndThatclass Specification extends BaseSpecification with OtherStufftrait MySpec extends Specification with MoreStuff
and I had the impression that changing the latest declaration to 
class MySpec extends Specification with MoreStuff
was ok. But again I need more time to understand what's wrong.
Eric.


----------------------------------------------
Eric TORREBORRE
T +61 411 707 402
E etorreborre@yahoo.com
B http://etorreborre.blogspot.com
P http://specs.googlecode.com
----------------------------------------------

De : Antonio Cunei <antonio.cunei@epfl.ch>
À : "scala-internals@listes.epfl.ch" <scala-internals@listes.epfl.ch>
Envoyé le : Jeu 26 Novembre 2009, 7 h 30 min 10 s
Objet : [scala-internals] Scala Meeting report, 2009-11-24

We are currently publishing a summary of each of the weekly meetings of the Scala Core Team.

This information is made available as a service to the community. It is by necessity rather brief and gives only a rough approximation of the main points of discussions explored during each meeting; it should not be taken as a source of reliable information, nor as a record of concrete or firm decisions, nor as anything other than a record of a simple discussion.

The summary that follows is primarily intended for Scala contributors and maintainers. If you are not a contributor to the Scala system, the information below is unlikely to be very useful to you, and you might lack some of the necessary background to make sense of all the discussion items.

We do not have enough people on the team to be able to write a more complete record, and we might also not have the resources to discuss every point in detail afterwards. Nevertheless, we hope that this record, cursory as it is, is better than nothing.

------------------------------------------------------------------------------


Report from the Scala Core Team meeting, 2009-11-24:

People attending the meeting: Martin, Iulian, Donna, Eugene, Alex, Hubert, Tiark, Gilles, Toni, Adriaan, Lukas, Philipp.

Topics discussed:

* Current work:
  - the new scaladoc will be committed soon
  - bug fixing
  - more work on specialization
  - the compiler is now interning symbols at classloading
  - scalac can now generate static constructors

* 2.8 Beta:
  - Did people in the community test their projects against 2.8.0.beta.RC1?
    - Lift: yes, but not the Scalacheck tests; we received no feedback from other projects
    - David Pollak reports they did not set up a testing infrastructure for other tools. They have not been coordinating with other framework authors.
  - We'll release a Beta1-RC2, non-optimized, and tell people to test their code and let us know whether we can go ahead and release RC3 optimized.

* Eclipse:
  - Build Manager is not yet there exactly. Still wrong dependencies from time to time
  - The plugin is basically feature-complete now. It needs more work on robustness and performance
  - Miles needs a couple of weeks
  - most user feedback is on unreliable building
  - build manager: most of the problems should be represented as tickets by now
  - Miles will prioritise them and we will work on getting the high-prio ones fixed asap

* Specialisation of pattern matching
  - In a class A[T] with "T" specialised for "Int", the following match can be replaced simply by "1":
    (x: T) match {
      case _: Int => 1
      ...
    }
  - Yes, Iulian will add that optimisation.
  - However, the following match will always return "0", including when the type of "x" is "Int":
    (x: T) match {
      case _: AnyRef => 0
      case _: Int => 1
    }
    This is because of the boxing of Int that happens as "x" has a parametric type.
  - There should be a warning in such cases (there is none now) and the specialisation optimisation must not be triggered.

* reverse in SequenceLike:
  - In certain situations (for example priority queues) reverse makes no sense. We'll retrieve the (implicitly supplied) ordering (using the implicitly method), swap it, and supply explicitly to the resulting collection.



Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland