-
Notifications
You must be signed in to change notification settings - Fork 111
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
Give some love to the project #1175
Changes from 9 commits
1f3c53e
706fa11
76354c8
aa306d6
ce7659b
170b5f8
38c34a7
7ac97ca
6d2f53f
9c69cf1
c5f9d2d
6a1f63c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,10 +37,10 @@ trait Liftables { | |
case '{ Assertion.Regex.digit } => Some(Assertion.Regex.digit) | ||
case '{ Assertion.Regex.nonDigit } => Some(Assertion.Regex.nonDigit) | ||
case '{ Assertion.Regex.literal(${Expr(str)}) } => Some(Assertion.Regex.literal(str)) | ||
case '{ Assertion.Regex.anyCharOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.anyCharOf(first, second, Varargs(rest).valueOrError*)) | ||
case '{ Assertion.Regex.anyRegexOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.anyRegexOf(first, second, Varargs(rest).valueOrError*)) | ||
case '{ Assertion.Regex.notAnyCharOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.notAnyCharOf(first, second, Varargs(rest).valueOrError*)) | ||
case '{ Assertion.Regex.notAnyRegexOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.notAnyRegexOf(first, second, Varargs(rest).valueOrError*)) | ||
case '{ Assertion.Regex.anyCharOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.anyCharOf(first, second, Varargs(rest).valueOrAbort*)) | ||
case '{ Assertion.Regex.anyRegexOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.anyRegexOf(first, second, Varargs(rest).valueOrAbort*)) | ||
case '{ Assertion.Regex.notAnyCharOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.notAnyCharOf(first, second, Varargs(rest).valueOrAbort*)) | ||
case '{ Assertion.Regex.notAnyRegexOf(${Expr(first)}, ${Expr(second)}, ${Varargs(rest)}: _*) } => Some(Assertion.Regex.notAnyRegexOf(first, second, Varargs(rest).valueOrAbort*)) | ||
case '{ Assertion.Regex.inRange(${Expr(start)}, ${Expr(end)}) } => Some(Assertion.Regex.inRange(start, end)) | ||
case '{ Assertion.Regex.notInRange(${Expr(start)}, ${Expr(end)}) } => Some(Assertion.Regex.notInRange(start, end)) | ||
case '{ Assertion.Regex.start } => Some(Assertion.Regex.start) | ||
|
@@ -130,7 +130,7 @@ trait Liftables { | |
case _: Short => summon[Numeric[Short]].asInstanceOf[Numeric[Any]] | ||
case _: Byte => summon[Numeric[Byte]].asInstanceOf[Numeric[Any]] | ||
case _: Char => summon[Numeric[Char]].asInstanceOf[Numeric[Any]] | ||
case other => report.throwError(s"NO NUMERIC FOR $other") | ||
case other => report.errorAndAbort(s"NO NUMERIC FOR $other") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was generating the following scalac warning: [warn] -- Deprecation Warning: /Users/jules/conduktor/workspace/zio-prelude/core/shared/src/main/scala-3/zio/prelude/Liftables.scala:133:31
[warn] 133 | case other => report.throwError(s"NO NUMERIC FOR $other")
[warn] | ^^^^^^^^^^^^^^^^^
[warn] |method throwError in trait reportModule is deprecated since 3.1.0: Use errorAndAbort See https://github.com/lampepfl/dotty/blob/main/library/src/scala/quoted/Quotes.scala |
||
} | ||
} | ||
|
||
|
@@ -146,7 +146,7 @@ trait Liftables { | |
case _: Short => SOrdering.Short.asInstanceOf[SOrdering[Any]] | ||
case _: Byte => SOrdering.Byte.asInstanceOf[SOrdering[Any]] | ||
case _: Char => SOrdering.Char.asInstanceOf[SOrdering[Any]] | ||
case other => report.throwError(s"NO ORDERING FOR $other") | ||
case other => report.errorAndAbort(s"NO ORDERING FOR $other") | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -863,7 +863,7 @@ object Equal extends EqualVersionSpecific { | |
* Since there is only one `Unit` value all equality comparisons will always be true. | ||
*/ | ||
implicit val UnitHashOrd: Hash[Unit] with Ord[Unit] = | ||
HashOrd.make(_.hashCode, (_, _) => Ordering.Equals, (_, _) => true) | ||
HashOrd.make(_ => 0, (_, _) => Ordering.Equals, (_, _) => true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We definitely wan to behave like |
||
|
||
/** | ||
* Derives an `Equal[Vector[A]]` given an `Equal[A]`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import explicitdeps.ExplicitDepsPlugin.autoImport._ | ||
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbtbuildinfo.BuildInfoKeys._ | ||
import sbt.Keys._ | ||
import sbtbuildinfo._ | ||
import sbtbuildinfo.BuildInfoKeys._ | ||
import sbtcrossproject.CrossPlugin.autoImport._ | ||
import scalafix.sbt.ScalafixPlugin.autoImport._ | ||
|
||
object BuildHelper { | ||
val Scala211: String = "2.11.12" | ||
val Scala212: String = "2.12.17" | ||
val Scala213: String = "2.13.10" | ||
val Scala3: String = "3.2.2" | ||
val Scala212: String = "2.12.18" | ||
val Scala213: String = "2.13.11" | ||
val Scala3: String = "3.3.0" | ||
|
||
val SilencerVersion = "1.7.13" | ||
|
||
|
@@ -139,21 +138,6 @@ object BuildHelper { | |
"-Xmax-classfile-name", | ||
"242" | ||
) ++ std2xOptions ++ optimizerOptions(optimize) | ||
case Some((2, 11)) => | ||
Seq( | ||
"-Ypartial-unification", | ||
"-Yno-adapted-args", | ||
"-Ywarn-inaccessible", | ||
"-Ywarn-infer-any", | ||
"-Ywarn-nullary-override", | ||
"-Ywarn-nullary-unit", | ||
"-Xexperimental", | ||
"-Ywarn-unused-import", | ||
"-Xfuture", | ||
"-Xsource:2.13", | ||
"-Xmax-classfile-name", | ||
"242" | ||
) ++ std2xOptions | ||
case _ => Seq.empty | ||
} | ||
|
||
|
@@ -166,14 +150,12 @@ object BuildHelper { | |
|
||
def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File) = { | ||
val versions = CrossVersion.partialVersion(scalaVer) match { | ||
case Some((2, 11)) => | ||
List("2.11+", "2.11-2.12") | ||
case Some((2, 12)) => | ||
List("2.11+", "2.12+", "2.11-2.12", "2.12-2.13") | ||
List("2.12", "2.12+", "2.12-2.13") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This class was in |
||
case Some((2, 13)) => | ||
List("2.11+", "2.12+", "2.13+", "2.12-2.13") | ||
List("2.12+", "2.13+", "2.12-2.13") | ||
case Some((3, _)) => | ||
List("2.11+", "2.12+", "2.13+") | ||
List("2.12+", "2.13+") | ||
case _ => | ||
List() | ||
} | ||
|
@@ -201,7 +183,7 @@ object BuildHelper { | |
|
||
def stdSettings(prjName: String) = Seq( | ||
name := s"$prjName", | ||
crossScalaVersions := Seq(Scala211, Scala212, Scala213, Scala3), | ||
crossScalaVersions := Seq(Scala212, Scala213, Scala3), | ||
ThisBuild / scalaVersion := Scala213, | ||
scalacOptions ++= stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), | ||
libraryDependencies ++= { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was generating the following scalac warning:
See https://github.com/lampepfl/dotty/blob/main/library/src/scala/quoted/Quotes.scala