Details

      Description

      Is test-opt no longer a jenkins tested target? On my machine, this never terminates, including with 2.9.0 final.

        scalac -optimise ./test/files/run/lisp.scala 
      

      Here's where it stops producing output under -Ylog:all:

      [log parser] parsing ScalaRunTime$$$$anonfun$$inner$$1$$5.class
      [log inliner] Inlining scala.runtime.ScalaRunTime.inlinedEquals in LispAny.asBoolean at pos: 9620
      [log inliner] Analyzing LispAny.asBoolean count 0 with 15 blocks
      [log inliner]  LispAny.asBoolean blocks before inlining: 4 (13) after: 13 (44)
      [log inliner] Analyzing LispAny.normalize count 0 with 105 blocks
      

      And if you wait long enough:

      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      	at scala.tools.nsc.util.HashSet.growTable(HashSet.scala:98)
      	at scala.tools.nsc.util.HashSet.findEntryOrUpdate(HashSet.scala:40)
      	at scala.tools.nsc.symtab.Types$$class.scala$$tools$$nsc$$symtab$$Types$$$$unique(Types.scala:2891)
      	at scala.tools.nsc.symtab.Types$$TypeRef$$.apply(Types.scala:1948)
      	at scala.tools.nsc.symtab.Types$$class.typeRef(Types.scala:2677)
      	at scala.tools.nsc.symtab.SymbolTable.typeRef(SymbolTable.scala:13)
      	at scala.tools.nsc.symtab.Types$$SubstSymMap.toType(Types.scala:3482)
      	at scala.tools.nsc.symtab.Types$$SubstSymMap.toType(Types.scala:3480)
      	at scala.tools.nsc.symtab.Types$$SubstMap.subst(Types.scala:3435)
      	at scala.tools.nsc.symtab.Types$$SubstMap.apply(Types.scala:3470)
      

      A look at the method it is analyzing might tempt one to implicate the pattern matcher, and one might be right, but I'm attaching -Xprint:expl, which looks well normal range.

      def normalize(x: Data): Data = x match {
        case CONS(SYM("def"),
               CONS(CONS(SYM(name), args), CONS(body, CONS(expr, NIL())))) =>
          normalize(list(SYM("def"),
            SYM(name), list(SYM("lambda"), args, body), expr))
        case CONS(SYM("cond"), CONS(CONS(SYM("else"), CONS(expr, NIL())),NIL())) =>
          normalize(expr)
        case CONS(SYM("cond"), CONS(CONS(test, CONS(expr, NIL())), rest)) =>
          normalize(list(SYM("if"), test, expr, CONS(SYM("cond"), rest)))
        case CONS(h, t) => CONS(normalize(h), normalize(t))
        case _ => x
      }
      

        Attachments

          Activity

          Hide
          extempore Paul Phillips added a comment -

          -Xprint:expl

          Show
          extempore Paul Phillips added a comment - -Xprint:expl
          Hide
          tolsen77 Trond Olsen added a comment -

          Looks similar to the problem with pattern matching with lists I reported in SI-4576.

          Show
          tolsen77 Trond Olsen added a comment - Looks similar to the problem with pattern matching with lists I reported in SI-4576 .
          Hide
          dragos Iulian Dragos added a comment -

          Seem related to the fix to SI-2171. I bet it's a catch 22.

          Show
          dragos Iulian Dragos added a comment - Seem related to the fix to SI-2171 . I bet it's a catch 22.
          Hide
          retronym Jason Zaugg added a comment -

          This was fixed between 2.10.0-M1 and 2.10.0-M2. I'm not game to move this test out of disabled, but I'm going to close this regardless.

          Show
          retronym Jason Zaugg added a comment - This was fixed between 2.10.0-M1 and 2.10.0-M2. I'm not game to move this test out of disabled, but I'm going to close this regardless.
          Hide
          ijuma Ismael Juma added a comment -

          I don't understand. If it is fixed and we have a test, we should move it out of disabled before closing the ticket, no?

          Show
          ijuma Ismael Juma added a comment - I don't understand. If it is fixed and we have a test, we should move it out of disabled before closing the ticket, no?
          Hide
          extempore Paul Phillips added a comment -

          I think it's because I've broken the build half a dozen times by trying to enable the lisp test.

          Show
          extempore Paul Phillips added a comment - I think it's because I've broken the build half a dozen times by trying to enable the lisp test.
          Hide
          retronym Jason Zaugg added a comment -

          Right you are; we should be able to add it as a pos test, even if it isn't stable enough as a run test.

          https://github.com/scala/scala/pull/634

          Show
          retronym Jason Zaugg added a comment - Right you are; we should be able to add it as a pos test, even if it isn't stable enough as a run test. https://github.com/scala/scala/pull/634
          Hide
          ijuma Ismael Juma added a comment -

          Fair enough.

          Show
          ijuma Ismael Juma added a comment - Fair enough.

            People

            • Assignee:
              dragos Iulian Dragos
              Reporter:
              extempore Paul Phillips
              TracCC:
              Ismael Juma, Paul Phillips, Trond Olsen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: