Skip to content

Commit ba5920d

Browse files
authored
Merge branch 'master' into replace_SheathLeafClauses
2 parents ee55e69 + e343ba4 commit ba5920d

File tree

21 files changed

+144
-67
lines changed

21 files changed

+144
-67
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 15
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4.0.0
22+
- uses: actions/checkout@v4.2.2
2323
- name: Cache sbt
2424
uses: actions/cache@v4
2525
with:
@@ -29,7 +29,7 @@ jobs:
2929
key: ${{ runner.os }}-${{matrix.scala}}-${{matrix.module}}-${{ hashFiles('**/build.sbt') }}
3030

3131
- name: Setup Java
32-
uses: actions/setup-java@v4.2.2
32+
uses: actions/setup-java@v4.5.0
3333
with:
3434
distribution: temurin
3535
java-version: '17'
@@ -77,7 +77,7 @@ jobs:
7777
name: Build ${{matrix.scala_short_dot}} - ${{matrix.module}}
7878

7979
steps:
80-
- uses: actions/checkout@v4.0.0
80+
- uses: actions/checkout@v4.2.2
8181
- name: Cache sbt
8282
uses: actions/cache@v4
8383
with:
@@ -87,7 +87,7 @@ jobs:
8787
key: ${{ runner.os }}-${{matrix.scala}}-${{matrix.module}}-${{ hashFiles('**/build.sbt') }}
8888

8989
- name: Setup Java
90-
uses: actions/setup-java@v4.2.2
90+
uses: actions/setup-java@v4.5.0
9191
with:
9292
distribution: temurin
9393
java-version: '17'
@@ -108,9 +108,9 @@ jobs:
108108
CI_RELEASE: publishSigned # By default, sbt-ci-release uses the `+publishSigned` which is publishing for all the Scala versions configured, which is not what we want
109109
CI_SNAPSHOT_RELEASE: publish # By default, sbt-ci-release uses the `+publish` which is publishing for all the Scala versions configured, which is not what we want
110110
steps:
111-
- uses: actions/checkout@v4.0.0
111+
- uses: actions/checkout@v4.2.2
112112
- name: Setup Java
113-
uses: actions/setup-java@v4.2.2
113+
uses: actions/setup-java@v4.5.0
114114
with:
115115
distribution: temurin
116116
java-version: '11'
@@ -122,5 +122,5 @@ jobs:
122122
env:
123123
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
124124
PGP_SECRET: ${{ secrets.PGP_SECRET }}
125-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
126-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
125+
SONATYPE_PASSWORD: ${{ secrets.GETQUILL_SONATYPE_TOKEN_PASSWORD }}
126+
SONATYPE_USERNAME: ${{ secrets.GETQUILL_SONATYPE_TOKEN_USER }}

.github/workflows/scala-steward.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Scala Steward
1414
steps:
1515
- name: Scala Steward
16-
uses: scala-steward-org/scala-steward-action@v2.69.0
16+
uses: scala-steward-org/scala-steward-action@v2.71.0
1717
with:
1818
github-app-id: ${{ secrets.SCALA_STEWARD_GITHUB_APP_ID }}
1919
github-app-installation-id: ${{ secrets.SCALA_STEWARD_GITHUB_APP_INSTALLATION_ID }}

.github/workflows/site.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
if: ${{ github.event_name == 'pull_request' }}
1919
steps:
2020
- name: Git Checkout
21-
uses: actions/checkout@v3.3.0
21+
uses: actions/checkout@v4.2.2
2222
with:
2323
fetch-depth: '0'
2424
- name: Setup Scala
25-
uses: actions/setup-java@v3.9.0
25+
uses: actions/setup-java@v4.5.0
2626
with:
2727
distribution: temurin
2828
java-version: 17
@@ -39,11 +39,11 @@ jobs:
3939
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
4040
steps:
4141
- name: Git Checkout
42-
uses: actions/checkout@v3.3.0
42+
uses: actions/checkout@v4.2.2
4343
with:
4444
fetch-depth: '0'
4545
- name: Setup Scala
46-
uses: actions/setup-java@v3.9.0
46+
uses: actions/setup-java@v4.5.0
4747
with:
4848
distribution: temurin
4949
java-version: 17
@@ -63,12 +63,12 @@ jobs:
6363
if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event.action == 'published')) }}
6464
steps:
6565
- name: Git Checkout
66-
uses: actions/checkout@v3.3.0
66+
uses: actions/checkout@v4.2.2
6767
with:
6868
ref: ${{ github.head_ref }}
6969
fetch-depth: '0'
7070
- name: Setup Scala
71-
uses: actions/setup-java@v3.9.0
71+
uses: actions/setup-java@v4.5.0
7272
with:
7373
distribution: temurin
7474
java-version: 17
@@ -82,7 +82,7 @@ jobs:
8282
git add README.md
8383
git commit -m "Update README.md" || echo "No changes to commit"
8484
- name: Create Pull Request
85-
uses: peter-evans/create-pull-request@v4.2.3
85+
uses: peter-evans/create-pull-request@v7.0.5
8686
with:
8787
body: |-
8888
Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.

build.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ lazy val `quill-core` =
216216
.settings(
217217
libraryDependencies ++= Seq(
218218
"com.typesafe" % "config" % "1.4.3",
219-
"dev.zio" %% "zio-logging" % "2.3.1",
219+
"dev.zio" %% "zio-logging" % "2.4.0",
220220
"dev.zio" %% "zio" % Version.zio,
221221
"dev.zio" %% "zio-streams" % Version.zio,
222222
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5"
@@ -510,7 +510,7 @@ lazy val `quill-orientdb` =
510510
.settings(
511511
Test / fork := true,
512512
libraryDependencies ++= Seq(
513-
"com.orientechnologies" % "orientdb-graphdb" % "3.2.33"
513+
"com.orientechnologies" % "orientdb-graphdb" % "3.2.36"
514514
)
515515
)
516516
.dependsOn(
@@ -531,11 +531,11 @@ lazy val `quill-test-kit` =
531531

532532
lazy val jdbcTestingLibraries = Seq(
533533
libraryDependencies ++= Seq(
534-
"com.zaxxer" % "HikariCP" % "5.1.0" exclude ("org.slf4j", "*"),
535-
"com.mysql" % "mysql-connector-j" % "9.0.0" % Test,
534+
"com.zaxxer" % "HikariCP" % "6.2.1" exclude ("org.slf4j", "*"),
535+
"com.mysql" % "mysql-connector-j" % "9.1.0" % Test,
536536
"com.h2database" % "h2" % "2.3.232" % Test,
537537
"org.postgresql" % "postgresql" % "42.7.4" % Test,
538-
"org.xerial" % "sqlite-jdbc" % "3.46.1.0" % Test,
538+
"org.xerial" % "sqlite-jdbc" % "3.47.1.0" % Test,
539539
"com.microsoft.sqlserver" % "mssql-jdbc" % "7.4.1.jre11" % Test,
540540
"com.oracle.ojdbc" % "ojdbc8" % "19.3.0.0" % Test,
541541
"org.mockito" %% "mockito-scala-scalatest" % "1.17.14" % Test
@@ -598,14 +598,14 @@ def excludePaths(paths: Seq[String]) = {
598598
}
599599

600600
val scala_v_12 = "2.12.20"
601-
val scala_v_13 = "2.13.14"
602-
val scala_v_30 = "3.3.3"
601+
val scala_v_13 = "2.13.15"
602+
val scala_v_30 = "3.3.4"
603603

604604
val scalaCollectionCompatVersion = "2.12.0"
605605

606606
lazy val loggingSettings = Seq(
607607
libraryDependencies ++= Seq(
608-
"ch.qos.logback" % "logback-classic" % "1.5.8" % Test
608+
"ch.qos.logback" % "logback-classic" % "1.5.12" % Test
609609
)
610610
)
611611

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import sbt.*
22
import sbt.Keys.*
33

44
object Version {
5-
val zio = "2.1.9"
5+
val zio = "2.1.13"
66
}
77

88
sealed trait ExcludeTests

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.1
1+
sbt.version=1.10.5

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releas
55
addDependencyTreePlugin
66

77
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
8-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0")
8+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2")
99
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
1010
addSbtPlugin("com.etsy" % "sbt-compile-quick-plugin" % "1.4.0")
1111
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10")
12-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1")
12+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")

quill-core/src/main/scala/io/getquill/context/ActionMacro.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@ class ActionMacro(val c: MacroContext) extends ContextMacro with ReifyLiftings {
293293
}
294294
}
295295
case other =>
296-
c.fail(s"Batch actions must be static quotations. Found: '$other'")
296+
c.fail(s"""Batch actions must be static quotations. Found: '$other'.
297+
|It's possible this is being caused by type ascription when declaring the implicit
298+
|schema meta, so try removing it if that's the case, e.g.:
299+
`implicit val schema: ctx.SchemaMeta[Row] = schemaMeta[Row]("rows")` ->
300+
`implicit val schema = schemaMeta[Row]("rows")`""")
297301
}
298302

299303
object ExtractLiftings {

quill-core/src/main/scala/io/getquill/context/ContextVerbTranslate.scala

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,25 @@ trait ContextTranslateProto {
6262
extractor: Extractor[T] = identityExtractor,
6363
prettyPrint: Boolean = false
6464
)(executionInfo: ExecutionInfo, dc: Runner): TranslateResult[String] =
65-
push(prepareParams(statement, prepare)) { params =>
66-
val query =
67-
if (params.nonEmpty) {
68-
params.foldLeft(statement) { case (expanded, param) =>
69-
expanded.replaceFirst("\\?", param)
65+
try {
66+
push(prepareParams(statement, prepare)) { params =>
67+
val query =
68+
if (params.nonEmpty) {
69+
params.foldLeft(statement) { case (expanded, param) =>
70+
expanded.replaceFirst("\\?", param)
71+
}
72+
} else {
73+
statement
7074
}
71-
} else {
72-
statement
73-
}
7475

75-
if (prettyPrint)
76-
idiom.format(query)
77-
else
78-
query
76+
if (prettyPrint)
77+
idiom.format(query)
78+
else
79+
query
80+
}
81+
} catch {
82+
case e: Exception =>
83+
wrap("<!-- Cannot display parameters due to preparation error: " + e.getMessage + " -->\n" + statement)
7984
}
8085

8186
def translateBatchQuery(

quill-engine/src/main/scala/io/getquill/AstPrinter.scala

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ object AstPrinter {
1818
}
1919
}
2020

21-
class AstPrinter(traceOpinions: Boolean, traceAstSimple: Boolean, traceQuats: QuatTrace) extends pprint.Walker {
21+
class AstPrinter(
22+
traceOpinions: Boolean = false,
23+
traceAstSimple: Boolean = false,
24+
traceQuats: QuatTrace = QuatTrace.None
25+
) extends pprint.Walker {
2226
val defaultWidth: Int = 150
2327
val defaultHeight: Int = Integer.MAX_VALUE
2428
val defaultIndent: Int = 2
@@ -83,7 +87,8 @@ class AstPrinter(traceOpinions: Boolean, traceAstSimple: Boolean, traceQuats: Qu
8387
def apply(list: Any*): treemake = Content(list.toList.map(Elem.apply))
8488
}
8589

86-
override def treeify(x: Any, escapeUnicode: Boolean, showFieldNames: Boolean): Tree =
90+
override def treeify(x: Any, escapeUnicode: Boolean, showFieldNames: Boolean): Tree = {
91+
def treeify1(x: Any) = treeify(x, escapeUnicode, showFieldNames)
8792
x match {
8893
case ast: Ast if (traceAstSimple) =>
8994
Tree.Literal("" + ast) // Do not blow up if it is null
@@ -117,7 +122,16 @@ class AstPrinter(traceOpinions: Boolean, traceAstSimple: Boolean, traceQuats: Qu
117122

118123
case s: ScalarValueLift => Tree.Apply("ScalarValueLift", treemake(s.name, s.source).withQuat(s.bestQuat).make)
119124

120-
case p: Property if (traceOpinions) =>
125+
case i: Infix =>
126+
TreeApplyList(
127+
"Infix",
128+
List(
129+
Tree.KeyValue("parts", ltree(i.parts.map(treeify1(_)))),
130+
Tree.KeyValue("params", ltree(i.params.map(treeify1(_))))
131+
)
132+
)
133+
134+
case p: Property =>
121135
TreeApplyList(
122136
"Property",
123137
l(treeify(p.ast, escapeUnicode, showFieldNames)) ++ l(treeify(p.name, escapeUnicode, showFieldNames)) ++
@@ -153,10 +167,12 @@ class AstPrinter(traceOpinions: Boolean, traceAstSimple: Boolean, traceQuats: Qu
153167

154168
case _ => super.treeify(x, escapeUnicode, showFieldNames)
155169
}
170+
}
156171

157172
private def TreeApplyList(prefix: String, body: List[Tree]) = Tree.Apply(prefix, body.iterator)
158173

159174
private def l(trees: Tree*): List[Tree] = List[Tree](trees: _*)
175+
private def ltree(trees: List[Tree]) = Tree.Apply("List", trees.iterator)
160176

161177
def apply(x: Any): fansi.Str =
162178
fansi.Str.join(this.tokenize(x).toSeq)

0 commit comments

Comments
 (0)