scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Re-enable MiMa once 2.13.0-RC1 is out #11470

Closed SethTisue closed 5 years ago

SethTisue commented 6 years ago

we may still be willing to break binary compatibility between M5 and RC1 and .0, but we'd like the build to let us know that it's happening so we don't do so unawares

SethTisue commented 6 years ago

scala/scala#6729 already leads to a big pile of errors such as:

[error]  * the type hierarchy of object scala.Option is different in current version. Missing types {scala.Serializable}
[error]    filter with: ProblemFilters.exclude[MissingTypesProblem]("scala.Option$")
[error]  * the type hierarchy of object scala.Tuple5 is different in current version. Missing types {scala.Serializable}
[error]    filter with: ProblemFilters.exclude[MissingTypesProblem]("scala.Tuple5$")
dwijnand commented 5 years ago

Probably best do this as soon as RC1 is cut. Let's lots of things that have been changed even after PR, a few examples:

  • class scala.throws is declared final in current version
  • class scala.Predef#<:< does not have a correspondent in current version
  • method Long()scala.reflect.AnyValManifest in object scala.reflect.ClassManifestFactory has a different result type in current version, where it is scala.reflect.ManifestFactory#LongManifest rather than scala.reflect.AnyValManifest
  • class scala.collection.View#Partition does not have a correspondent in current version
  • object scala.collection.immutable.OldHashSet#EmptyOldHashSet does not have a correspondent in current version
  • method i_=(Int)Unit in class scala.collection.immutable.Map#Map4#Map4Iterator does not have a correspondent in current version
  • method readResolve()java.lang.Object in class scala.collection.immutable.LazyList#SerializationProxy does not have a correspondent in current version
  • object scala.collection.convert.WrapAsJava does not have a correspondent in current version
  • abstract method isRename()Boolean in interface scala.reflect.api.Trees#ImportSelectorApi does not have a correspondent in other version
dwijnand commented 5 years ago

Steps for when that's done:

  1. Update the plugin (the old plugin doesn't work with newer version of scala-compiler, which it links against):
-addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.15")
+addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
  1. Set the reference version: Global / mimaReferenceVersion := Some("2.13.0-RC1")

  2. Create some temporary mima settings to handle validating against a pre-release:

import com.typesafe.tools.mima.core._
val tempMimaPreSettings = Seq(
  mimaBinaryIssueFilters ++= Seq(
    ProblemFilters.exclude[Problem]("scala.reflect.internal.*"),
  ),
)
  1. Add those to library and reflect:
@@ -359,7 +372,8 @@ lazy val library = configureAsSubproject(project)
       "/project/packaging" -> <packaging>jar</packaging>
     ),
     mimaPreviousArtifacts := mimaReferenceVersion.value.map(organization.value % name.value % _).toSet,
-    mimaCheckDirection := "both"
+    mimaCheckDirection := "both",
+    tempMimaPreSettings,
   )
   .settings(filterDocSources("*.scala" -- (regexFileFilter(".*/runtime/.*\\$\\.scala") ||
                                            regexFileFilter(".*/runtime/ScalaRunTime\\.scala"))))
@@ -385,7 +399,8 @@ lazy val reflect = configureAsSubproject(project)
       "/project/packaging" -> <packaging>jar</packaging>
     ),
     mimaPreviousArtifacts := mimaReferenceVersion.value.map(organization.value % name.value % _).toSet,
-    mimaCheckDirection := "both"
+    mimaCheckDirection := "both",
+    tempMimaPreSettings,
   )
   .dependsOn(library)
  1. Iterate with library/mimaReportBinaryIssues and reflect/mimaReportBinaryIssues.

Once 2.13.0 is out tempMimaPreSettings can be dropped.

dwijnand commented 5 years ago

I'd love to re-assign this to a 2.13.0 milestone, but it doesn't exist (ATM).

SethTisue commented 5 years ago

I'd love to re-assign this to a 2.13.0 milestone, but it doesn't exist (ATM).

we have one now, I made one in scala/bug as well