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

New warnings prevent absolute 2.10 compatibility under -Xfatal-warnings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.1-RC1, Scala 2.10.1-RC2
    • Fix Version/s: Scala 2.10.1
    • Component/s: None
    • Labels:
      None

      Description

      From Rex Kerr

      Note that the change in behavior in 2.10.1 to throw warnings for stuff like

      maths/package.scala:1281: warning: class OutlierDist should be placed directly in package maths instead of package object maths. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.

      and also

      mwt/MultiSensed.scala:143: warning: The outer reference in this type test cannot be checked at run time. final case class NotValid(val i0: Int, val i1: Int) extends Chunk {}

      means that I can no longer run with -Xfatal-warnings, which was how I found all the places I needed to import language.whatever; now any new instances will be lost in the screensfull of warnings.

      Incidentally, is there a way to make the latter warning go away? I don't want to push the trait and case classes out of the enclosing class since they don't make any logical sense elsewhere and they are class-relative information (despite not linking back to the superclass). But I would like to be able to declare that I don't intend to check that aspect of the type at runtime; compile time is sufficient. (I realize that I could just refer to the enclosing class, but I'd rather avoid the extra field since there will be millions of these things.) If the underlying bug for 5954 is fixed, I'd want to fix these also so I can -Xfatal-warnings again.

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment - - edited

          Hijacking this ticket: could we please tone the following down to debugwarn while we're at it? The user has no recourse but worried head scratching.

          "[warn] /Users/jason/code/scalaz/concurrent/src/main/scala/scalaz/concurrent/Actor.scala:52: Visited SCOPE_EXIT before visiting corresponding SCOPE_ENTER. SI-6049"
          
          Show
          Jason Zaugg added a comment - - edited Hijacking this ticket: could we please tone the following down to debugwarn while we're at it? The user has no recourse but worried head scratching. "[warn] /Users/jason/code/scalaz/concurrent/src/main/scala/scalaz/concurrent/Actor.scala:52: Visited SCOPE_EXIT before visiting corresponding SCOPE_ENTER. SI-6049"
          Hide
          James Iry added a comment -

          Is it a new warning in 2.10.1-RCx that prevents compatibility under -Xfatal-warnings? If not it goes in another ticket.

          Show
          James Iry added a comment - Is it a new warning in 2.10.1-RCx that prevents compatibility under -Xfatal-warnings? If not it goes in another ticket.
          Hide
          Jason Zaugg added a comment -

          It's unfinished business in SI-6049, I noticed a trickle of confusion in the comments over there, and I just got the warning myself. But it's been around since 2.10.0, so it's a regresson against 2.9.2 with -Xfatal-warnings. I'll lodge another ticket.

          Show
          Jason Zaugg added a comment - It's unfinished business in SI-6049 , I noticed a trickle of confusion in the comments over there, and I just got the warning myself. But it's been around since 2.10.0, so it's a regresson against 2.9.2 with -Xfatal-warnings. I'll lodge another ticket.
          Hide
          Adriaan Moors added a comment -

          It looks like I'm assigned, so I'll take door number 1, the -Ydebug variant.

          Show
          Adriaan Moors added a comment - It looks like I'm assigned, so I'll take door number 1, the -Ydebug variant.
          Show
          Adriaan Moors added a comment - https://github.com/scala/scala/pull/2189

            People

            • Assignee:
              Adriaan Moors
              Reporter:
              James Iry
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development