Skip to content
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

Update scala-compiler, scala-library to 2.13.12 #2862

Merged
merged 8 commits into from
Sep 20, 2023
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
Expand Up @@ -764,7 +764,7 @@ def excludePaths(paths: Seq[String]) = {
}

val scala_v_12 = "2.12.18"
val scala_v_13 = "2.13.10"
val scala_v_13 = "2.13.12"
val scala_v_30 = "3.3.1"

val scalaCollectionCompatVersion = "2.11.0"
Expand Down
9 changes: 9 additions & 0 deletions quill-sql/src/test/scala-2.12/io/getquill/Versions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.getquill

/**
* Comes from
* https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571
*/
object Versions {
val scala = "2.12"
}
9 changes: 9 additions & 0 deletions quill-sql/src/test/scala-2.13/io/getquill/Versions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.getquill

/**
* Comes from
* https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571
*/
object Versions {
val scala = "2.13"
}
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,18 @@ class BooleanLiteralSupportSpec extends Spec {
val q = quote {
query[TestEntity].filter(t => !true)
}
ctx.run(q).string mustEqual
"SELECT t.s, t.i, t.l, t.o, t.b FROM TestEntity t WHERE NOT (1 = 1)"

// See:
// - Discord question: https://discord.com/channels/632150470000902164/632150470000902166/1153978338168291369
// - Discord answer: https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571
val isScala212 = io.getquill.Versions.scala.startsWith("2.12")
val expectedQuery =
if (isScala212)
"SELECT t.s, t.i, t.l, t.o, t.b FROM TestEntity t WHERE NOT (1 = 1)"
else
"SELECT t.s, t.i, t.l, t.o, t.b FROM TestEntity t WHERE 1 = 0"

ctx.run(q).string mustEqual expectedQuery
}
"field" in testContext.withDialect(MirrorSqlDialectWithBooleanLiterals) { ctx =>
import ctx._
Expand Down