Scala Programming Language
  1. Scala Programming Language
  2. SI-7752

Huge error message and compilation times for a one-liner

    Details

      Description

      Thanks to Matthew Farwell for minimizing and sending me this issue. It looks particularly ugly inside the IDE, but it's not specific.

      The following file fails compilation after 42 seconds with a 176KB error message:

      package foobar;
      
      import org.scalatest.prop.TableDrivenPropertyChecks._
      
      class PresentationCompilerTest {
        def foobar() = Table((1))
      }
      

      It uses `scalatest`. Use the following `build.sbt` for 2.11.0-M4:

      scalaVersion := "2.11.0-M4"
      
      libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP35" cross CrossVersion.full
      

      Same outcome with 2.10.2

        Issue Links

          Activity

          Hide
          Grzegorz Kossakowski added a comment -

          Thanks for report! I'll look into it next week.

          Show
          Grzegorz Kossakowski added a comment - Thanks for report! I'll look into it next week.
          Hide
          Jason Zaugg added a comment -

          If we disable the disambiguation of identifiers in the type error issued in `ContextError#applyErrorMsg` altogether, we can see the original error message. This takes 1s to compile.

          [error] /Users/jason/code/scratch3/test.scala:6: overloaded method value apply with alternatives:
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)*)org.scalatest.prop.TableFor22[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)*)org.scalatest.prop.TableFor21[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)*)org.scalatest.prop.TableFor20[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)*)org.scalatest.prop.TableFor19[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)*)org.scalatest.prop.TableFor18[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)*)org.scalatest.prop.TableFor17[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)*)org.scalatest.prop.TableFor16[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)*)org.scalatest.prop.TableFor15[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M, N](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)*)org.scalatest.prop.TableFor14[A,B,C,D,E,F,G,H,I,J,K,L,M,N] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L, M](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M)*)org.scalatest.prop.TableFor13[A,B,C,D,E,F,G,H,I,J,K,L,M] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K, L](heading: (String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L)*)org.scalatest.prop.TableFor12[A,B,C,D,E,F,G,H,I,J,K,L] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J, K](heading: (String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K)*)org.scalatest.prop.TableFor11[A,B,C,D,E,F,G,H,I,J,K] <and>
          [error]   [A, B, C, D, E, F, G, H, I, J](heading: (String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J)*)org.scalatest.prop.TableFor10[A,B,C,D,E,F,G,H,I,J] <and>
          [error]   [A, B, C, D, E, F, G, H, I](heading: (String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I)*)org.scalatest.prop.TableFor9[A,B,C,D,E,F,G,H,I] <and>
          [error]   [A, B, C, D, E, F, G, H](heading: (String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H)*)org.scalatest.prop.TableFor8[A,B,C,D,E,F,G,H] <and>
          [error]   [A, B, C, D, E, F, G](heading: (String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G)*)org.scalatest.prop.TableFor7[A,B,C,D,E,F,G] <and>
          [error]   [A, B, C, D, E, F](heading: (String, String, String, String, String, String), rows: (A, B, C, D, E, F)*)org.scalatest.prop.TableFor6[A,B,C,D,E,F] <and>
          [error]   [A, B, C, D, E](heading: (String, String, String, String, String), rows: (A, B, C, D, E)*)org.scalatest.prop.TableFor5[A,B,C,D,E] <and>
          [error]   [A, B, C, D](heading: (String, String, String, String), rows: (A, B, C, D)*)org.scalatest.prop.TableFor4[A,B,C,D] <and>
          [error]   [A, B, C](heading: (String, String, String), rows: (A, B, C)*)org.scalatest.prop.TableFor3[A,B,C] <and>
          [error]   [A, B](heading: (String, String), rows: (A, B)*)org.scalatest.prop.TableFor2[A,B] <and>
          [error]   [A](heading: String, rows: A*)org.scalatest.prop.TableFor1[A]
          [error]  cannot be applied to (Int)
          

          Proposed fix:
          https://github.com/retronym/scala/compare/scala:2.10.x...ticket/7752
          https://scala-webapps.epfl.ch/jenkins/job/scala-checkin-manual/

          Show
          Jason Zaugg added a comment - If we disable the disambiguation of identifiers in the type error issued in `ContextError#applyErrorMsg` altogether, we can see the original error message. This takes 1s to compile. [error] /Users/jason/code/scratch3/test.scala:6: overloaded method value apply with alternatives: [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)*)org.scalatest.prop.TableFor22[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)*)org.scalatest.prop.TableFor21[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)*)org.scalatest.prop.TableFor20[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)*)org.scalatest.prop.TableFor19[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)*)org.scalatest.prop.TableFor18[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)*)org.scalatest.prop.TableFor17[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)*)org.scalatest.prop.TableFor16[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)*)org.scalatest.prop.TableFor15[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M, N](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)*)org.scalatest.prop.TableFor14[A,B,C,D,E,F,G,H,I,J,K,L,M,N] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L, M](heading: (String, String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L, M)*)org.scalatest.prop.TableFor13[A,B,C,D,E,F,G,H,I,J,K,L,M] <and> [error] [A, B, C, D, E, F, G, H, I, J, K, L](heading: (String, String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K, L)*)org.scalatest.prop.TableFor12[A,B,C,D,E,F,G,H,I,J,K,L] <and> [error] [A, B, C, D, E, F, G, H, I, J, K](heading: (String, String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J, K)*)org.scalatest.prop.TableFor11[A,B,C,D,E,F,G,H,I,J,K] <and> [error] [A, B, C, D, E, F, G, H, I, J](heading: (String, String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I, J)*)org.scalatest.prop.TableFor10[A,B,C,D,E,F,G,H,I,J] <and> [error] [A, B, C, D, E, F, G, H, I](heading: (String, String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H, I)*)org.scalatest.prop.TableFor9[A,B,C,D,E,F,G,H,I] <and> [error] [A, B, C, D, E, F, G, H](heading: (String, String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G, H)*)org.scalatest.prop.TableFor8[A,B,C,D,E,F,G,H] <and> [error] [A, B, C, D, E, F, G](heading: (String, String, String, String, String, String, String), rows: (A, B, C, D, E, F, G)*)org.scalatest.prop.TableFor7[A,B,C,D,E,F,G] <and> [error] [A, B, C, D, E, F](heading: (String, String, String, String, String, String), rows: (A, B, C, D, E, F)*)org.scalatest.prop.TableFor6[A,B,C,D,E,F] <and> [error] [A, B, C, D, E](heading: (String, String, String, String, String), rows: (A, B, C, D, E)*)org.scalatest.prop.TableFor5[A,B,C,D,E] <and> [error] [A, B, C, D](heading: (String, String, String, String), rows: (A, B, C, D)*)org.scalatest.prop.TableFor4[A,B,C,D] <and> [error] [A, B, C](heading: (String, String, String), rows: (A, B, C)*)org.scalatest.prop.TableFor3[A,B,C] <and> [error] [A, B](heading: (String, String), rows: (A, B)*)org.scalatest.prop.TableFor2[A,B] <and> [error] [A](heading: String, rows: A*)org.scalatest.prop.TableFor1[A] [error] cannot be applied to (Int) Proposed fix: https://github.com/retronym/scala/compare/scala:2.10.x...ticket/7752 https://scala-webapps.epfl.ch/jenkins/job/scala-checkin-manual/
          Hide
          Jason Zaugg added a comment -

          Hey, it's a popular bug.

          Show
          Jason Zaugg added a comment - Hey, it's a popular bug.
          Hide
          Grzegorz Kossakowski added a comment -

          I assigned it to you Jason.

          Show
          Grzegorz Kossakowski added a comment - I assigned it to you Jason.
          Hide
          Jason Zaugg added a comment -

          Oh, and more or less a duplicate of SI-7040. I'll close that one.

          Show
          Jason Zaugg added a comment - Oh, and more or less a duplicate of SI-7040 . I'll close that one.
          Show
          Jason Zaugg added a comment - https://github.com/scala/scala/pull/2834

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Iulian Dragos
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development