Skip to content
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
scala: [2.13.17, 3.3.7, 3.6.4]
scala: [2.13.17, 3.3.7, 3.7.3]
java: [temurin@8, temurin@11, temurin@17, temurin@21]
runs-on: ${{ matrix.os }}
steps:
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val scala213 = "2.13.17"
lazy val scala3 = "3.3.7"
lazy val scala3_6 = "3.6.4"
lazy val scala3Next = "3.7.3"

ThisBuild / crossScalaVersions := Seq(scala213, scala3, scala3_6)
ThisBuild / crossScalaVersions := Seq(scala213, scala3, scala3Next)
ThisBuild / scalaVersion := scala3
ThisBuild / version := "0.7.0"

Expand Down Expand Up @@ -38,7 +38,7 @@ lazy val mavenRepoUrl = "https://maven.bondlink-cdn.com"

lazy val baseSettings = Seq(
scalaVersion := scala3,
crossScalaVersions := Seq(scala213, scala3, scala3_6),
crossScalaVersions := Seq(scala213, scala3, scala3Next),
organization := "com.bondlink",
publishTo := Some("BondLink S3".at("s3://bondlink-maven-repo")),
resolvers += "bondlink-maven-repo" at mavenRepoUrl,
Expand Down Expand Up @@ -77,7 +77,7 @@ lazy val root = project.in(file("."))
.settings(noPublishSettings)
.disablePlugins(MimaPlugin)

lazy val munit = Def.setting("org.scalameta" %% "munit" % "1.2.1" % Test)
lazy val munit = Def.setting("org.scalameta" %%% "munit" % "1.2.1" % Test)
lazy val shapeless = Def.setting("com.chuusai" %%% "shapeless" % "2.3.13")
lazy val scalacheck = Def.setting("org.scalacheck" %%% "scalacheck" % "1.19.0" % Test)

Expand Down Expand Up @@ -113,8 +113,8 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("c
)
},
// Disable publishing for Scala 3.6
publish := { if (scalaVersion.value == scala3_6) () else publish.value },
publishLocal := { if (scalaVersion.value == scala3_6) () else publishLocal.value },
publish := { if (scalaVersion.value == scala3Next) () else publish.value },
publishLocal := { if (scalaVersion.value == scala3Next) () else publishLocal.value },
)

lazy val docs = project.in(file("formless-docs"))
Expand Down
9 changes: 5 additions & 4 deletions core/shared/src/main/scala-3/formless/record/FindField.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ object FindField {
case '[::[head, tail]] if Expr.summon[Cmp[head, F]].nonEmpty =>
// We need to replace `->>` with a concrete `class` type so the match works
// Matches on opaque types like `->>` will *never* match
concrete(TypeRepr.of[head].dealias).asType match {
val concretTypeRepr = concrete(TypeRepr.of[head].dealias)
concretTypeRepr.asType match {
case '[ConcreteLabelled[k, v]] =>
(unConcrete(TypeRepr.of[k]).asType, unConcrete(TypeRepr.of[v]).asType) match {
case ('[key], '[value]) =>
'{ FindField.Inst[T, F, Cmp, key, value, [a] =>> HList.Concat[Rep[a], tail], HList.Concat[Rem, tail]](${ Expr(idx) }) }
}
case '[t] =>
report.errorAndAbort(s"Unexpected type: ${Type.show[t]}")
}: @annotation.nowarn("msg=match may not be exhaustive")
case _ =>
report.errorAndAbort(s"Unexpected type: ${concretTypeRepr.show}")
}
case '[::[head, tail]] =>
go[[a] =>> HList.Append[Rep[head], a], HList.Append[Rem, head], tail](idx + 1)
Expand Down
Loading