Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Remove some unused variables and imports noticed by scala 3.3.0's new lints
  • Loading branch information
rayrobdod committed Jun 3, 2023
1 parent ba7d1be commit b6478c0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 28 deletions.
8 changes: 0 additions & 8 deletions Base/src/main/scala-3/VersionSpecificExtractor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,8 @@ trait VersionSpecificExtractor[Expr[_], Type[_], -A] {

val tupleModule = tupleTypeConstructorSymbol.companionModule
val tupleConstructorTree = Ref(tupleModule)
val partsFn:quoted.Expr[UnexprA] => List[quoted.Expr[Any]] = {a => expr.parts.map(partFn => partFn.value(a))}
val tupleTreeFn = partsFn.andThen({parts =>
tupleConstructorTree
.select(tupleModule.methodMember("apply")(0))
.appliedToTypeTrees(parts.map(_ => TypeIdent(defn.AnyClass)))
.appliedToArgs(parts.map(_.asTerm))
})

val unapplyTypeConstructorTree = TypeIdent(Symbol.requiredClass("com.rayrobdod.stringContextParserCombinator.Unapply.Fixed"))
val unapplyTypeTreeFn = tupleTreeFn.andThen(tupleTree => Applied(unapplyTypeConstructorTree, List(unexpraTypeTree, tupleTree)))

val anonfunType = MethodType(
List("a"))(
Expand Down
3 changes: 0 additions & 3 deletions Base/src/main/scala-3/package.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.rayrobdod

import scala.Predef.refArrayOps
import scala.collection.immutable.Seq
import scala.language.higherKinds
import scala.quoted.Expr
import scala.quoted.Quotes
import scala.quoted.Type
import scala.quoted.Varargs

/**
* A library for implementing StringContext methods via Interpolator Combinators
Expand Down
2 changes: 1 addition & 1 deletion JsonParser/src/main/scala-3/MacroImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.rayrobdod.stringContextParserCombinatorExample.json

import scala.collection.immutable.Seq
import scala.quoted.{Expr, Quotes, Type}
import org.json4s.{JValue, JNull, JBool, JNumber, JLong, JInt, JDecimal, JString, JArray, JObject}
import org.json4s.{JValue, JNull, JBool, JNumber, JString, JArray, JObject}
import com.rayrobdod.stringContextParserCombinator._

object MacroImpl {
Expand Down
1 change: 0 additions & 1 deletion TimeParser/src/main/scala-3/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.rayrobdod.stringContextParserCombinatorExample.datetime
import java.time._
import scala.quoted._
import com.rayrobdod.stringContextParserCombinator._
import com.rayrobdod.stringContextParserCombinatorExample.datetime.Digit.given_Repeated

object MacroImpl {
import ExprConversions.given
Expand Down
26 changes: 13 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ ThisBuild / version := "-SNAPSHOT"
ThisBuild / organization := "com.rayrobdod"

val scala211Ver = "2.11.12"
val scala212Ver = "2.12.17"
val scala213Ver = "2.13.10"
val scala30Ver = "3.2.0"
val scala212Ver = "2.12.18"
val scala213Ver = "2.13.11"
val scala3Ver = "3.3.0"

lazy val sharedSettings = Seq(
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % "3.2.14" % "test",
"org.scalatest" %%% "scalatest" % "3.2.16" % "test",
),
Compile / compile / scalacOptions += "-feature",
Compile / compile / scalacOptions ++= (scalaBinaryVersion.value match {
Expand All @@ -19,7 +19,7 @@ lazy val sharedSettings = Seq(
Compile / compile / scalacOptions ++= (scalaBinaryVersion.value match {
case "2.11" | "2.12" => Seq("-deprecation", "-Ywarn-unused-import", "-Ywarn-unused", "-Xlint:_", "-Xfuture", "-Xcheckinit", "-language:higherKinds")
case "2.13" => Seq("-Ywarn-unused:_", "-Xlint:_", "-Xcheckinit")
case _ => Seq("-deprecation")
case _ => Seq("-deprecation", "-Wunused:all")
}),
Compile / doc / scalacOptions ++= (scalaBinaryVersion.value match {
case "2.11" | "2.12" | "2.13" => Seq(
Expand Down Expand Up @@ -67,12 +67,12 @@ lazy val base = (projectMatrix in file("Base"))
scala211Ver,
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))
.jsPlatform(scalaVersions = Seq(
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))

lazy val json = (projectMatrix in file("JsonParser"))
Expand All @@ -93,12 +93,12 @@ lazy val json = (projectMatrix in file("JsonParser"))
scala211Ver,
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))
.jsPlatform(scalaVersions = Seq(
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))

lazy val time = (projectMatrix in file("TimeParser"))
Expand All @@ -116,15 +116,15 @@ lazy val time = (projectMatrix in file("TimeParser"))
scala211Ver,
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))
.jsPlatform(scalaVersions = Seq(
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
),
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.4.0",
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0",
),
)

Expand All @@ -143,7 +143,7 @@ lazy val uri = (projectMatrix in file("UriParser"))
scala211Ver,
scala212Ver,
scala213Ver,
scala30Ver,
scala3Ver,
))

autoScalaLibrary := false
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.1
sbt.version=1.9.0
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1")

0 comments on commit b6478c0

Please sign in to comment.