Skip to content

Update sbt from 1.9.9 to 1.10.0 #1143

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

Merged
merged 5 commits into from
May 27, 2024
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.avast.sst.fs2kafka

import cats.effect.{IO, Resource}
import cats.syntax.flatMap._
import cats.effect.{ContextShift, IO, Resource, Timer}
import cats.syntax.flatMap.*
import com.dimafeng.testcontainers.{ForAllTestContainer, KafkaContainer}
import fs2.kafka.{AutoOffsetReset, ProducerRecord, ProducerRecords}
import org.scalatest.funsuite.AsyncFunSuite
Expand All @@ -10,10 +10,10 @@ import scala.concurrent.ExecutionContext.Implicits.global

class Fs2KafkaModuleTest extends AsyncFunSuite with ForAllTestContainer {

override val container = KafkaContainer()
override val container: KafkaContainer = KafkaContainer()

implicit private val cs = IO.contextShift(global)
implicit private val timer = IO.timer(global)
implicit private val cs: ContextShift[IO] = IO.contextShift(global)
implicit private val timer: Timer[IO] = IO.timer(global)

test("producer") {
val io = for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package com.avast.sst.fs2kafka

import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

@nowarn("msg=unused value")
class KafkaConfigTest extends AnyFunSuite {

test("verify ConsumerConfig defaults") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
import io.grpc.*
import org.slf4j.Logger

import scala.annotation.nowarn

/** Adds basic logging around each gRPC call. */
class LoggingServerInterceptor(logger: Logger) extends ServerInterceptor {

Expand All @@ -18,6 +20,7 @@ class LoggingServerInterceptor(logger: Logger) extends ServerInterceptor {
new OnMessageServerCallListener(methodName, next.startCall(finalCall, headers))
}

@nowarn("msg=a type was inferred to be `Object`")
private class CloseServerCall[A, B](methodName: String, delegate: ServerCall[A, B]) extends SimpleForwardingServerCall[A, B](delegate) {
override def close(status: Status, trailers: Metadata): Unit = {
import io.grpc.Status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import org.scalatest.funsuite.AsyncFunSuite
import org.typelevel.ci.CIString

import java.net.InetSocketAddress
import scala.annotation.nowarn
import scala.concurrent.ExecutionContext

@nowarn("msg=unused value")
@SuppressWarnings(Array("scalafix:Disable.get", "scalafix:Disable.toString", "scalafix:Disable.createUnresolved"))
class CorrelationIdMiddlewareTest extends AsyncFunSuite with Http4sDsl[IO] {

Expand Down
10 changes: 5 additions & 5 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object BuildSettings {
private def isScala3(scalaVersion: String): Boolean = CrossVersion.partialVersion(scalaVersion).exists(_._1 == 3)

private val scala212 = "2.12.19"
private val scala213 = "2.13.8"
private val scala213 = "2.13.13"
private val scala3 = "3.1.1"

lazy val common: Seq[Def.Setting[_]] = Seq(
Expand Down Expand Up @@ -47,11 +47,11 @@ object BuildSettings {
Dependencies.scalafixScaluzzi,
Dependencies.scalafixOrganizeImports
),
scalacOptions ++= {
scalacOptions := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Seq("-source:future", "-language:adhocExtensions")
case Some((2, _)) => Seq("-Xsource:3")
case _ => Seq.empty
case Some((3, _)) => scalacOptions.value ++ Seq("-source:future", "-language:adhocExtensions")
case Some((2, _)) => scalacOptions.value.filterNot(_ == "-Xfatal-warnings") ++ Seq("-Xsource:3")
case _ => scalacOptions.value
}
},
Compile / doc / scalacOptions -= "-Xfatal-warnings",
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import cats.data.NonEmptyList
import cats.effect.SyncIO
import org.scalatest.funsuite.AnyFunSuite
import pureconfig.error.ConfigReaderException
import pureconfig.generic.semiauto._
import pureconfig.generic.semiauto.*
import pureconfig.{ConfigReader, ConfigSource}

import scala.annotation.nowarn

@nowarn("msg=unused value")
class PureConfigModuleTest extends AnyFunSuite {

private val source = ConfigSource.string("""|number = 123
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import com.avast.sst.pureconfig.util.Toggle.{Disabled, Enabled}
import org.scalatest.diagrams.Diagrams
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

@nowarn("msg=unused value")
class ToggleTest extends AnyFunSuite with Diagrams {

test("has Functor instance and map method works correctly") {
Expand Down
Loading