Skip to content

Commit

Permalink
Update to latest versions of all Scala versions
Browse files Browse the repository at this point in the history
- Run scalafmt and scalafix
- Remove unused errors
  • Loading branch information
calvinlfer committed Sep 30, 2024
1 parent fefd1e0 commit ad5d3dc
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 34 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.19, 2.13.14, 3.3.3]
scala: [2.12.20, 2.13.15, 3.3.4]
java: [temurin@11, temurin@17, temurin@21]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.14]
scala: [2.13.15]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -120,32 +120,32 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Download target directories (2.12.19)
- name: Download target directories (2.12.20)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.12.19-${{ matrix.java }}
name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }}

- name: Inflate target directories (2.12.19)
- name: Inflate target directories (2.12.20)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.14)
- name: Download target directories (2.13.15)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
name: target-${{ matrix.os }}-2.13.15-${{ matrix.java }}

- name: Inflate target directories (2.13.14)
- name: Inflate target directories (2.13.15)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.3.3)
- name: Download target directories (3.3.4)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-3.3.3-${{ matrix.java }}
name: target-${{ matrix.os }}-3.3.4-${{ matrix.java }}

- name: Inflate target directories (3.3.3)
- name: Inflate target directories (3.3.4)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
inThisBuild {
val scala212 = "2.12.19"
val scala213 = "2.13.14"
val scala3 = "3.3.3"
val scala212 = "2.12.20"
val scala213 = "2.13.15"
val scala3 = "3.3.4"

List(
scalaVersion := scala213,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package io.kaizensolutions.virgil.codecs

import scala.deriving.Mirror
import com.datastax.oss.driver.api.core.cql.Row
import io.kaizensolutions.virgil.annotations.CqlColumn
import magnolia1.*

import scala.deriving.Mirror

// Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet)
trait RowDecoderMagnoliaDerivation extends ProductDerivation[CqlRowDecoder]:
final def join[T](ctx: CaseClass[Typeclass, T]): CqlRowDecoder.Object[T] = (row: Row) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package io.kaizensolutions.virgil.codecs

import scala.deriving.Mirror
import com.datastax.oss.driver.api.core.data.UdtValue
import io.kaizensolutions.virgil.annotations.CqlColumn
import magnolia1.*

import scala.deriving.Mirror

// Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet)
trait UdtValueDecoderMagnoliaDerivation extends ProductDerivation[CqlUdtValueDecoder]:
final def join[T](ctx: CaseClass[Typeclass, T]): CqlUdtValueDecoder.Object[T] =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package io.kaizensolutions.virgil.codecs

import scala.deriving.Mirror
import com.datastax.oss.driver.api.core.data.UdtValue
import io.kaizensolutions.virgil.annotations.CqlColumn
import magnolia1._
import magnolia1.*

import scala.deriving.Mirror

// Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet)
trait UdtValueEncoderMagnoliaDerivation extends ProductDerivation[CqlUdtValueEncoder]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package io.kaizensolutions.virgil.codecs

import com.datastax.oss.driver.api.core.`type`._
import com.datastax.oss.driver.api.core.data.CqlDuration
import com.datastax.oss.driver.api.core.data.{SettableByIndex, SettableByName}
import com.datastax.oss.driver.api.core.data.SettableByIndex
import com.datastax.oss.driver.api.core.data.SettableByName
import com.datastax.oss.driver.api.core.data.UdtValue

import scala.jdk.CollectionConverters._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.CursorSpecDatatypes.CursorUdtAddress

trait CursorUdtAddressInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Address

trait UDT_AddressInstances {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Data

trait UDT_DataInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Email

trait UDT_EmailInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleCollectionNestedUDTType

trait UDT_ExampleCollectionNestedUDTTypeInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleNestedType

trait UDT_ExampleNestedTypeInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder}
import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder
import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder
import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleType

trait UDT_ExampleTypeInstances:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil.models

import io.kaizensolutions.virgil.annotations.CqlColumn

import java.time.LocalDate

final case class MusicLibraryItem(
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.14")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.kaizensolutions.virgil.internal
import com.datastax.oss.driver.api.core.CqlSession
import com.datastax.oss.driver.api.core.cql.{BatchType => _, _}
import com.datastax.oss.driver.api.core.metrics.Metrics
import io.kaizensolutions.virgil.Paged
import io.kaizensolutions.virgil._
import io.kaizensolutions.virgil.configuration.ExecutionAttributes
import io.kaizensolutions.virgil.configuration.PageState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kaizensolutions.virgil

import com.datastax.oss.driver.api.core.{CqlSession, CqlSessionBuilder}
import com.datastax.oss.driver.api.core.CqlSession
import com.datastax.oss.driver.api.core.CqlSessionBuilder
import io.kaizensolutions.virgil.configuration.ConsistencyLevel
import io.kaizensolutions.virgil.configuration.ExecutionAttributes
import io.kaizensolutions.virgil.cql._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.kaizensolutions.virgil

import io.kaizensolutions.virgil.models.MusicLibraryItem
import com.datastax.oss.driver.api.core.cql.Row
import io.kaizensolutions.virgil.codecs.CqlRowDecoder
import io.kaizensolutions.virgil.cql._
import io.kaizensolutions.virgil.dsl._
import io.kaizensolutions.virgil.models.MusicLibraryItem
import zio.Chunk
import zio.RIO
import zio.test._
import io.kaizensolutions.virgil.dsl.SelectBuilder
import com.datastax.oss.driver.api.core.cql.Row
import io.kaizensolutions.virgil.codecs.CqlRowDecoder
import zio.{Chunk, RIO}

object SelectBuilderSpec {
def selectBuilderSpec =
Expand Down

0 comments on commit ad5d3dc

Please sign in to comment.