Skip to content

Commit

Permalink
Merge pull request #626 from SethTisue/simplify-build
Browse files Browse the repository at this point in the history
remove dependency on scala-collection-compat
  • Loading branch information
dwijnand authored May 11, 2021
2 parents a52ef6f + 855ca5d commit 747bc32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ val root = project.in(file(".")).settings(
aggregateProjects(core, sbtplugin, functionalTests)

val munit = "org.scalameta" %% "munit" % "0.7.25"
val scalaCollectionCompat = "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.3"

val core = project.settings(
name := "mima-core",
crossScalaVersions += scala213,
libraryDependencies += scalaCollectionCompat,
libraryDependencies += munit % Test,
testFrameworks += new TestFramework("munit.Framework"),
MimaSettings.mimaSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.typesafe.tools.mima.core

import scala.annotation.tailrec
import scala.collection.mutable
import scala.collection.compat._

sealed class SyntheticPackageInfo(val owner: PackageInfo, val name: String) extends PackageInfo {
def definitions = owner.definitions
Expand All @@ -25,11 +24,12 @@ sealed class ConcretePackageInfo(val owner: PackageInfo, cp: ClassPath, pkg: Str
def definitions = defs

lazy val packages: mutable.Map[String, PackageInfo] =
mutable.Map.from(
// this way of building the map cross-compiles on 2.12 and 2.13 without
// needing to bring in scala-collection-compat
mutable.Map() ++
cp.packages(pkg).map { p =>
p.stripPrefix(s"$pkg.") -> new ConcretePackageInfo(this, cp, p, defs)
}
)

lazy val classes =
cp.classes(pkg).map { f =>
Expand Down

0 comments on commit 747bc32

Please sign in to comment.