-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,019 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
// Project | ||
val projectName = "type-safe-equality" | ||
ThisBuild / organization := "ch.produs" | ||
ThisBuild / organizationName := "produs ag" | ||
ThisBuild / organizationHomepage := None | ||
ThisBuild / description := "Scala 3 type safe equality" | ||
ThisBuild / homepage := Some(url("https://github.com/antognini/type-safe-equality")) | ||
ThisBuild / homepage := Some(url(s"https://github.com/antognini/$projectName")) | ||
ThisBuild / licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")) | ||
ThisBuild / version := "0.5.0" | ||
ThisBuild / scalaVersion := "3.3.0" | ||
ThisBuild / version := "0.6.0" | ||
ThisBuild / versionScheme := Some("semver-spec") | ||
ThisBuild / publishTo := sonatypePublishToBundle.value | ||
ThisBuild / scmInfo := Some( | ||
ScmInfo( | ||
url("https://github.com/antognini/type-safe-equality"), | ||
"scm:[email protected]:antognini/type-safe-equality.git" | ||
)) | ||
ThisBuild / developers := List( | ||
Developer( | ||
id = "LA", | ||
name = "Luigi Antognini", | ||
email = "", | ||
url = url("https://github.com/antognini") | ||
)) | ||
) | ||
) | ||
ThisBuild / scmInfo := Some( | ||
ScmInfo( | ||
url(s"https://github.com/antognini/$projectName"), | ||
s"scm:[email protected]:antognini/$projectName.git" | ||
) | ||
) | ||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
|
||
lazy val compileOptions = Seq( | ||
|
||
// Compile | ||
ThisBuild / scalaVersion := "3.3.0" | ||
ThisBuild / Compile / scalacOptions := Seq( | ||
"-encoding", "utf8", | ||
"-deprecation", | ||
"-language:scala3", | ||
|
@@ -33,34 +38,26 @@ lazy val compileOptions = Seq( | |
// "-Wunused:all" | ||
) | ||
|
||
lazy val root = project | ||
.in(file(".")) | ||
.dependsOn(eq) | ||
.settings( | ||
name := "type-safe-equality", | ||
publish / skip := true, | ||
Compile / scalacOptions ++= compileOptions | ||
) | ||
.aggregate(eq, examples) | ||
|
||
lazy val eq = project | ||
.in(file("eq")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.scalatest" %% "scalatest" % "3.2.16" % "test" | ||
), | ||
name := "type-safe-equality", | ||
Compile / scalacOptions ++= compileOptions | ||
) | ||
lazy val root = project.in(file(".")).dependsOn(equality).settings( | ||
name := projectName, | ||
publish / skip := true | ||
).aggregate(equality, examples) | ||
|
||
lazy val examples = project | ||
.in(file("examples")) | ||
.dependsOn(eq) | ||
.settings( | ||
publish / skip := true, | ||
Compile / scalacOptions ++= compileOptions, | ||
Compile / scalacOptions += "-Yimports:scala,scala.Predef,java.lang,equality.all" | ||
lazy val equality = project.in(file("equality")).settings( | ||
publishLocal := publishLocal.dependsOn(clean, Test / test).value, | ||
publish := publish.dependsOn(clean, Test / test).value, | ||
name := projectName, | ||
libraryDependencies ++= Seq( | ||
"org.scalatest" %% "scalatest" % "3.2.16" % "test" | ||
) | ||
) | ||
|
||
lazy val examples = project.in(file("examples")).dependsOn(equality).settings( | ||
publish / skip := true, | ||
Compile / scalacOptions += "-Yimports:scala,scala.Predef,java.lang,equality" | ||
) | ||
|
||
|
||
// Publish | ||
sonatypeRepository := "https://s01.oss.sonatype.org/service/local" | ||
|
@@ -79,3 +76,4 @@ credentials ++= Seq( | |
Option(System.getenv("SONATYPE_PASSWORD")).getOrElse("") | ||
) | ||
) | ||
ThisBuild / publishTo := sonatypePublishToBundle.value |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
eq/src/main/scala/equality/java_security/EqInstances.scala
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
eq/src/main/scala/equality/scala_concurrent/EqInstances.scala
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package equality | ||
|
||
export equality.core.Eq | ||
export equality.core.Eq.canEqualFromEq | ||
export equality.core.Eq.eqFromAssumed | ||
|
||
export equality.core.EqRef | ||
export equality.core.EqRef.Operators.* | ||
|
||
export equality.scala_.{AnyNumber, AnyJavaNumber} | ||
export equality.scala_.Instances.given | ||
export equality.scala_collection.Instances.given | ||
export equality.scala_collection.CollectionExtension.* | ||
export equality.scala_concurrent.Instances.given | ||
export equality.scala_concurrent_duration.Instances.given | ||
export equality.scala_io.Instances.given | ||
export equality.scala_math.Instances.given | ||
export equality.scala_util.Instances.given | ||
|
||
export equality.java_io.Instances.given | ||
export equality.java_lang.Instances.given | ||
export equality.java_math.Instances.given | ||
export equality.java_net.Instances.given | ||
export equality.java_nio.Instances.given | ||
export equality.java_nio_charset.Instances.given | ||
export equality.java_nio_file.Instances.given | ||
export equality.java_security.Instances.given | ||
export equality.java_sql.Instances.given | ||
export equality.java_text.Instances.given | ||
export equality.java_time.Instances.given | ||
export equality.java_util.Instances.given |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package equality.core | ||
|
||
import scala.annotation.implicitNotFound | ||
import scala.util.NotGiven | ||
|
||
private val message = "the sources need to be compiled with -language:strictEquality" | ||
|
||
private val _ = checkStrictEqualityBuild() | ||
|
||
def checkStrictEqualityBuild()(using @implicitNotFound(message) ev: NotGiven[CanEqual[Any, Any]]): Boolean = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.