Skip to content

Remove unnecessary stdlib-bootstrapped overriden files #18081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ object MiMaFilters {
// Files that are not compiled in the bootstrapped library
ProblemFilters.exclude[MissingClassProblem]("scala.AnyVal"),

// Inferred result type of non-private member differs (fix in Scala 2)
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#IteratorWrapper.remove"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#JCollectionWrapper.iterableFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#JDictionaryWrapper.mapFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#JIterableWrapper.iterableFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#JListWrapper.iterableFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.convert.JavaCollectionWrappers#JPropertiesWrapper.mapFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.immutable.BitSet.bitSetFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.immutable.TreeSet.sortedIterableFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.mutable.BitSet.bitSetFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.mutable.TreeMap.sortedMapFactory"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.View#LeftPartitionMapped.iterator"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.View#RightPartitionMapped.iterator"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.concurrent.duration.FiniteDuration.unary_-"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.math.BigDecimal.underlying"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.math.Ordering.tryCompare"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JConcurrentMapWrapper.empty"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JMapWrapper.empty"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JPropertiesWrapper.empty"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.mutable.LinkedHashMap.newBuilder"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.mutable.LinkedHashSet.newBuilder"),

// Scala language features
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.language.<clinit>"),
Expand Down Expand Up @@ -124,6 +145,12 @@ object MiMaFilters {
ProblemFilters.exclude[MissingFieldProblem]("scala.language.experimental"),
ProblemFilters.exclude[MissingFieldProblem]("scala.languageFeature*"),

// Inferred result type of non-private member differs (fix in Scala 2)
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JConcurrentMapWrapper.empty"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JMapWrapper.empty"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.collection.convert.JavaCollectionWrappers#JPropertiesWrapper.empty"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.math.Ordering.tryCompare"),

// https://github.com/scala/scala/blob/v2.13.10/src/library/scala/collection/immutable/Range.scala#LL155C1-L156C1
// Issue #17519: we do not set final on the default methods of final copy method.
ProblemFilters.exclude[FinalMethodProblem]("scala.collection.immutable.Range.copy$default$*"),
Expand Down
48 changes: 35 additions & 13 deletions project/TastyMiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@ import tastymima.intf._

object TastyMiMaFilters {
val StdlibBootstrapped: java.util.List[ProblemMatcher] = asList(
// Ok (needs library from 2.13.12): Inferred result type of non-private member differs
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.*.elemTag"), // Fix in https://github.com/scala/scala/pull/10444
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JCollectionWrapper.iterableFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JConcurrentMapWrapper.empty"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JDictionaryWrapper.mapFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JIterableWrapper.iterableFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JListWrapper.iterableFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JMapWrapper.empty"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JPropertiesWrapper.empty"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.JPropertiesWrapper.mapFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.TreeSet.sortedIterableFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.TreeMap.sortedMapFactory"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.classTagCompanion"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.View.LeftPartitionMapped.iterator"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.View.RightPartitionMapped.iterator"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.concurrent.duration.FiniteDuration.unary_-"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.reflect.ManifestFactory.*.runtimeClass"), // Fix in https://github.com/scala/scala/pull/10444
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.sys.process.ProcessBuilderImpl.AbstractBuilder.toSink"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.sys.process.ProcessBuilderImpl.AbstractBuilder.toSource"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.sys.process.ProcessBuilderImpl.FileImpl.toSink"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.sys.process.ProcessBuilderImpl.FileImpl.toSource"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.sys.process.ProcessBuilderImpl.URLImpl.toSource"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.concurrent.FailedNode.string"), // Fix in https://github.com/scala/scala/pull/10444
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.JavaCollectionWrappers.IterableWrapperTrait.iterator"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.JavaCollectionWrappers.IteratorWrapper.remove"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.mutable.LinkedHashMap.newBuilder"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.mutable.LinkedHashSet.newBuilder"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.math.Ordering.tryCompare"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.sys.process.ProcessBuilderImpl.AndBuilder.createProcess"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.sys.process.ProcessBuilderImpl.OrBuilder.createProcess"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.sys.process.ProcessBuilderImpl.PipedBuilder.createProcess"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.sys.process.ProcessBuilderImpl.SequenceBuilder.createProcess"), // Fix in https://github.com/scala/scala/pull/10435
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.BitSet.bitSetFactory"), // Fix in https://github.com/scala/scala/pull/10444
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.BitSet.bitSetFactory"), // Fix in https://github.com/scala/scala/pull/10444

// Probably OK
ProblemMatcher.make(ProblemKind.IncompatibleSelfTypeChange, "scala.*"),

Expand All @@ -12,10 +47,6 @@ object TastyMiMaFilters {
// Problem: Missing Serializable in companions of serializable classes
ProblemMatcher.make(ProblemKind.MissingParent, "scala.*$"),

// Problem: Class[T] or ClassTag[T] with `T` equal to wildcard `_ >: Nothing <: AnyVal` instead of a specific primitive type `T`
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.reflect.ManifestFactory.*.runtimeClass"),
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.*.elemTag"),

// Problem: ConstantType for `null` versus `scala.Null`
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.Unrolled.<init>$default$4"),

Expand All @@ -30,11 +61,6 @@ object TastyMiMaFilters {
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.math.Big*.underlying"),
ProblemMatcher.make(ProblemKind.NewAbstractMember, "scala.math.ScalaNumericConversions.underlying"),

// Problem: Inferred result type of non-private member differs
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.JavaCollectionWrappers.IterableWrapperTrait.iterator"),
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.classTagCompanion"),
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.concurrent.FailedNode.string"),

// Problem: super accessors
ProblemMatcher.make(ProblemKind.NewAbstractMember, "scala.*.superscala$*$*$$*"), // The member scala.collection.mutable.Cloneable.superscala$collection$mutable$Cloneable$$clone was concrete or did not exist but is abstract in current version

Expand All @@ -47,10 +73,6 @@ object TastyMiMaFilters {
// TASTy-MiMa bug? Wildcards in self type
ProblemMatcher.make(ProblemKind.MissingTypeMember, "scala.collection.generic.DefaultSerializable._$1"),

// TASTy-MiMa bug? module classes
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.BitSet.bitSetFactory"), // The symbol scala.collection.immutable.BitSet.bitSetFactory has an incompatible type in current version: before: scala.collection.immutable.BitSet$; after: scala.collection.immutable.BitSet.type
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.BitSet.bitSetFactory"), // The symbol scala.collection.mutable.BitSet.bitSetFactory has an incompatible type in current version: before: scala.collection.mutable.BitSet$; after: scala.collection.mutable.BitSet.type

// TASTy-MiMa bugs
ProblemMatcher.make(ProblemKind.InternalError, "scala.collection.SeqView.appendedAll"),
ProblemMatcher.make(ProblemKind.InternalError, "scala.collection.SeqView.concat"),
Expand Down
Loading