Skip to content

Update scala-library, scala-reflect to 2.13.16 #127

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
merged 3 commits into from
Feb 13, 2025
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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.13.15"
ThisBuild / scalaVersion := "2.13.16"
ThisBuild / scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation")
ThisBuild / libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
Expand Down
6 changes: 1 addition & 5 deletions laws/src/main/scala/Generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,8 @@ object AllStrLongGenerators {
val weakHashMap = register(io.MutKV)(_.weakHashMap())
}

object MutKrefV {
val anyRefMap = register(io.MutKrefV)(_.anyRefMap())
}

/** This line is needed to actually perform the registration of all generators! */
val force = ImmKV :: MutKV :: MutKrefV :: Nil
val force = ImmKV :: MutKV :: Nil

lazy val all = everyoneBuffer.result()

Expand Down
26 changes: 1 addition & 25 deletions laws/src/main/scala/Instantiator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -509,30 +509,6 @@ object InstantiatorsOfStrLong extends InstantiatorsOf[(String, Long)] with Insta
protected implicit def classTagA: ClassTag[(String, Long)] = ClassTagSource.classTagStringLong
protected def allFlags = Array[Flag]()

protected implicit val sizeOfAnyRefMap_String_Long: Sizable[collection.mutable.AnyRefMap[String, Long]] =
new Sizable[collection.mutable.AnyRefMap[String, Long]] {
def sizeof(m: collection.mutable.AnyRefMap[String, Long]) = m.size
}

object MutKrefV extends Instance.PackagePath {
// If we have other (String, _) types, move this out into a trait
def nickname = "MutKrefV"
def fullyQualified = "scala.collection.mutable"
def C[CC: TypeTag: Sizable](ccf: Array[(String, Long)] => CC, flags: Flag*)(implicit nm: sourcecode.Name): Deployed[(String, Long), CC] = {
val gen = kvInst.makeWith(ccf, (MAP +: flags): _*)(nm, implicitly[TypeTag[CC]], implicitly[Sizable[CC]])
val ans = new Deployed[(String, Long), CC]{
val secretly = gen
var accesses: Int = 0
val name = nm.value.toString
def group = typeTagA.tpe.toString + " in " + nickname
def apply(): Instance.FromArray[(String, Long), CC] = { accesses += 1; secretly }
}
registry += ans
ans
}
val anyRefMap = C({ a => val m = new collection.mutable.AnyRefMap[String, Long]; for (kv <- a) m += kv; m }, SPECTYPE)
}

lazy val possible_a = Array("wish" -> 3L)
lazy val possible_x = Array(
Array.empty[(String, Long)],
Expand All @@ -547,5 +523,5 @@ object InstantiatorsOfStrLong extends InstantiatorsOf[(String, Long)] with Insta
*
* In particular, notice that we're only taking the key-value instantiators, so we only register maps, not all collections.
*/
val force = ImmKV :: MutKV :: MutKrefV :: Nil
val force = ImmKV :: MutKV :: Nil
}
2 changes: 1 addition & 1 deletion laws/src/main/scala/Runner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ trait AllRunner {
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global // Maybe make a fixed-size thread pool?
val toRun = runners.map(_())
val ans = collection.mutable.AnyRefMap.empty[String, Test.Tested]
val ans = collection.mutable.Map.empty[String, Test.Tested]
val slots = new Array[(String, Future[(String, Test.Tested)])](1 max (atOnce min toRun.length))
var i = 0;
var it = toRun.iterator
Expand Down
Loading