diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d73f679..cb45360 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,7 @@ updates: - "dependency-update" ignore: # managed by sbt-github-actions - - dependency-name: "olafurpg/setup-scala" + - dependency-name: "actions/setup-java" - dependency-name: "actions/checkout" - dependency-name: "actions/cache" - dependency-name: "actions/upload-artifact" diff --git a/.github/mergify.yml b/.github/mergify.yml index acf7c1d..ec83964 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -21,6 +21,7 @@ pull_request_rules: - or: - files=project/build.properties - files=project/plugins.sbt + - files=.scalafmt.conf - body~=labels:.*semver-patch - "#approved-reviews-by>=1" - and: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0510d5f..cd9dd05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.8, 2.12.15, 3.1.1] + scala: [2.13.10, 2.12.17, 3.3.0] java: [temurin@8, temurin@17] runs-on: ${{ matrix.os }} steps: @@ -83,7 +83,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.8] + scala: [2.13.10] java: [temurin@8] runs-on: ${{ matrix.os }} steps: @@ -118,32 +118,32 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (2.13.8) + - name: Download target directories (2.13.10) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.10-${{ matrix.java }} - - name: Inflate target directories (2.13.8) + - name: Inflate target directories (2.13.10) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.15) + - name: Download target directories (2.12.17) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }} + name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }} - - name: Inflate target directories (2.12.15) + - name: Inflate target directories (2.12.17) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.1.1) + - name: Download target directories (3.3.0) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-3.1.1-${{ matrix.java }} + name: target-${{ matrix.os }}-3.3.0-${{ matrix.java }} - - name: Inflate target directories (3.1.1) + - name: Inflate target directories (3.3.0) run: | tar xf targets.tar rm targets.tar diff --git a/.scalafmt.conf b/.scalafmt.conf index 44e6ccf..4d0acfe 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.4.3" +version = "3.8.3" runner.dialect = scala213 diff --git a/README.md b/README.md index a7a6dfb..f09cf1f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Integration layer for [Trace4Cats] and [Natchez]. Add it to your `build.sbt`: ```scala -"io.janstenpickle" %% "trace4cats-natchez" % "0.13.1" +"io.janstenpickle" %% "trace4cats-natchez" % "0.14.2" ``` ## Contributing diff --git a/build.sbt b/build.sbt index 10cd0ac..6bdd894 100644 --- a/build.sbt +++ b/build.sbt @@ -7,9 +7,14 @@ lazy val commonSettings = Seq( case _ => Seq.empty } }, - scalacOptions += "-Wconf:any:wv", + scalacOptions += { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, _)) => "-Wconf:any:wv" + case _ => "-Wconf:any:v" + } + }, Test / fork := true, - resolvers += Resolver.sonatypeRepo("releases"), + resolvers ++= Resolver.sonatypeOssRepos("releases"), ) lazy val noPublishSettings = @@ -32,5 +37,5 @@ lazy val natchez = (project in file("modules/natchez")) .settings(publishSettings) .settings( name := "trace4cats-natchez", - libraryDependencies ++= Seq(Dependencies.trace4catsInject, Dependencies.natchez) + libraryDependencies ++= Seq(Dependencies.trace4catsCore, Dependencies.natchez) ) diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/KernelConverter.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/KernelConverter.scala deleted file mode 100644 index ee3456d..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/KernelConverter.scala +++ /dev/null @@ -1,9 +0,0 @@ -package io.janstenpickle.trace4cats.natchez - -import io.janstenpickle.trace4cats.model.TraceHeaders -import natchez.Kernel - -object KernelConverter extends TraceHeaders.Converter[Kernel] { - def from(t: Kernel): TraceHeaders = TraceHeaders.of(t.toHeaders) - def to(h: TraceHeaders): Kernel = Kernel(h.values.map { case (k, v) => k.toString -> v }) -} diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsSpan.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsSpan.scala deleted file mode 100644 index 20cc3fb..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsSpan.scala +++ /dev/null @@ -1,40 +0,0 @@ -package io.janstenpickle.trace4cats.natchez - -import java.net.URI - -import _root_.natchez.{Kernel, Span, TraceValue => V} -import cats.Applicative -import cats.effect.kernel.{Resource, Sync} -import cats.syntax.show._ -import io.janstenpickle.trace4cats.ToHeaders -import io.janstenpickle.trace4cats.model.AttributeValue._ -import io.janstenpickle.trace4cats.model.SpanKind - -final case class Trace4CatsSpan[F[_]: Sync](span: io.janstenpickle.trace4cats.Span[F], toHeaders: ToHeaders) - extends Span[F] { - override def put(fields: (String, V)*): F[Unit] = - span.putAll(fields.map { - case (k, V.StringValue(v)) => k -> StringValue(v) - case (k, V.NumberValue(v)) => k -> DoubleValue(v.doubleValue()) - case (k, V.BooleanValue(v)) => k -> BooleanValue(v) - }: _*) - - override def kernel: F[Kernel] = Applicative[F].pure(KernelConverter.to(toHeaders.fromContext(span.context))) - - override def span(name: String): Resource[F, Span[F]] = - Trace4CatsSpan(span.child(name, SpanKind.Internal), toHeaders) - - override def spanId: F[Option[String]] = Applicative[F].pure(Some(span.context.spanId.show)) - - override def traceId: F[Option[String]] = Applicative[F].pure(Some(span.context.traceId.show)) - - override def traceUri: F[Option[URI]] = Applicative[F].pure(None) -} - -object Trace4CatsSpan { - def apply[F[_]: Sync]( - span: Resource[F, io.janstenpickle.trace4cats.Span[F]], - toHeaders: ToHeaders - ): Resource[F, Span[F]] = - span.map(Trace4CatsSpan(_, toHeaders)) -} diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsTracer.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsTracer.scala deleted file mode 100644 index 204b52c..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/Trace4CatsTracer.scala +++ /dev/null @@ -1,31 +0,0 @@ -package io.janstenpickle.trace4cats.natchez - -import cats.effect.kernel.{Resource, Sync} -import io.janstenpickle.trace4cats.ToHeaders -import io.janstenpickle.trace4cats.kernel.{SpanCompleter, SpanSampler} -import io.janstenpickle.trace4cats.model.SpanKind -import natchez.{EntryPoint, Kernel, Span} - -object Trace4CatsTracer { - def entryPoint[F[_]: Sync]( - sampler: SpanSampler[F], - completer: SpanCompleter[F], - toHeaders: ToHeaders = ToHeaders.standard - ): EntryPoint[F] = - new EntryPoint[F] { - override def root(name: String): Resource[F, Span[F]] = - Trace4CatsSpan(io.janstenpickle.trace4cats.Span.root(name, SpanKind.Internal, sampler, completer), toHeaders) - - override def continue(name: String, kernel: Kernel): Resource[F, Span[F]] = - Trace4CatsSpan( - toHeaders.toContext(KernelConverter.from(kernel)) match { - case None => io.janstenpickle.trace4cats.Span.root(name, SpanKind.Server, sampler, completer) - case Some(parent) => - io.janstenpickle.trace4cats.Span.child(name, parent, SpanKind.Server, sampler, completer) - }, - toHeaders - ) - - override def continueOrElseRoot(name: String, kernel: Kernel): Resource[F, Span[F]] = continue(name, kernel) - } -} diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala deleted file mode 100644 index df973a7..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala +++ /dev/null @@ -1,26 +0,0 @@ -package io.janstenpickle.trace4cats.natchez.conversions - -import java.net.URI - -import _root_.natchez.{Kernel, Trace => NatchezTrace, TraceValue => V} -import cats.Applicative -import cats.syntax.functor._ -import io.janstenpickle.trace4cats.inject.Trace -import io.janstenpickle.trace4cats.model.AttributeValue.{BooleanValue, DoubleValue, StringValue} -import io.janstenpickle.trace4cats.natchez.KernelConverter - -trait Trace4CatsToNatchez { - implicit def trace4CatsToNatchez[F[_]: Applicative](implicit trace: Trace[F]): NatchezTrace[F] = - new NatchezTrace[F] { - override def put(fields: (String, V)*): F[Unit] = - trace.putAll(fields.map { - case (k, V.StringValue(v)) => k -> StringValue(v) - case (k, V.NumberValue(v)) => k -> DoubleValue(v.doubleValue()) - case (k, V.BooleanValue(v)) => k -> BooleanValue(v) - }: _*) - override def kernel: F[Kernel] = trace.headers.map(KernelConverter.to) - override def span[A](name: String)(k: F[A]): F[A] = trace.span[A](name)(k) - override def traceId: F[Option[String]] = trace.traceId - override def traceUri: F[Option[URI]] = Applicative[F].pure(None) - } -} diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/fromNatchez.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/fromNatchez.scala deleted file mode 100644 index 6f04feb..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/fromNatchez.scala +++ /dev/null @@ -1,3 +0,0 @@ -package io.janstenpickle.trace4cats.natchez.conversions - -object fromNatchez extends NatchezToTrace4Cats diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/toNatchez.scala b/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/toNatchez.scala deleted file mode 100644 index 7717d86..0000000 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/toNatchez.scala +++ /dev/null @@ -1,3 +0,0 @@ -package io.janstenpickle.trace4cats.natchez.conversions - -object toNatchez extends Trace4CatsToNatchez diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/KernelConverter.scala b/modules/natchez/src/main/scala/trace4cats/natchez/KernelConverter.scala new file mode 100644 index 0000000..3e58b5e --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/KernelConverter.scala @@ -0,0 +1,9 @@ +package trace4cats.natchez + +import natchez.Kernel +import trace4cats.model.TraceHeaders + +object KernelConverter extends TraceHeaders.Converter[Kernel] { + def from(t: Kernel): TraceHeaders = TraceHeaders(t.toHeaders) + def to(h: TraceHeaders): Kernel = Kernel(h.values) +} diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/SpanKindConverter.scala b/modules/natchez/src/main/scala/trace4cats/natchez/SpanKindConverter.scala new file mode 100644 index 0000000..5542f5b --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/SpanKindConverter.scala @@ -0,0 +1,22 @@ +package trace4cats.natchez + +import natchez.Span +import trace4cats.model.SpanKind + +object SpanKindConverter { + def convert(kind: Span.SpanKind): SpanKind = kind match { + case Span.SpanKind.Internal => SpanKind.Internal + case Span.SpanKind.Client => SpanKind.Client + case Span.SpanKind.Server => SpanKind.Server + case Span.SpanKind.Producer => SpanKind.Producer + case Span.SpanKind.Consumer => SpanKind.Consumer + } + + def convert(kind: SpanKind): Span.SpanKind = kind match { + case SpanKind.Internal => Span.SpanKind.Internal + case SpanKind.Client => Span.SpanKind.Client + case SpanKind.Server => Span.SpanKind.Server + case SpanKind.Producer => Span.SpanKind.Producer + case SpanKind.Consumer => Span.SpanKind.Consumer + } +} diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsSpan.scala b/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsSpan.scala new file mode 100644 index 0000000..cc481b9 --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsSpan.scala @@ -0,0 +1,47 @@ +package trace4cats.natchez + +import _root_.natchez.{Kernel, Span, TraceValue => V} +import cats.Applicative +import cats.effect.kernel.{Resource, Sync} +import cats.syntax.show._ +import trace4cats.ToHeaders +import trace4cats.model.AttributeValue._ +import trace4cats.natchez.SpanKindConverter.convert + +import java.net.URI + +final case class Trace4CatsSpan[F[_]: Sync](span: trace4cats.Span[F], toHeaders: ToHeaders) extends Span[F] { + override def put(fields: (String, V)*): F[Unit] = + span.putAll(fields.map { + case (k, V.StringValue(v)) => k -> StringValue(v) + case (k, V.NumberValue(v)) => k -> DoubleValue(v.doubleValue()) + case (k, V.BooleanValue(v)) => k -> BooleanValue(v) + }: _*) + + override def log(fields: (String, V)*): F[Unit] = put(fields: _*) + + override def log(event: String): F[Unit] = put("event" -> V.StringValue(event)) + + override def attachError(err: Throwable, fields: (String, V)*): F[Unit] = + put( + ("error.message" -> V.StringValue(err.getMessage)) :: + ("error.class" -> V.StringValue(err.getClass.getSimpleName)) :: + fields.toList: _* + ) + + override def kernel: F[Kernel] = Applicative[F].pure(KernelConverter.to(toHeaders.fromContext(span.context))) + + override def span(name: String, options: Span.Options): Resource[F, Span[F]] = + Trace4CatsSpan(span.child(name, convert(options.spanKind)), toHeaders) + + override def spanId: F[Option[String]] = Applicative[F].pure(Some(span.context.spanId.show)) + + override def traceId: F[Option[String]] = Applicative[F].pure(Some(span.context.traceId.show)) + + override def traceUri: F[Option[URI]] = Applicative[F].pure(None) +} + +object Trace4CatsSpan { + def apply[F[_]: Sync](span: Resource[F, trace4cats.Span[F]], toHeaders: ToHeaders): Resource[F, Span[F]] = + span.map(Trace4CatsSpan(_, toHeaders)) +} diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsTracer.scala b/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsTracer.scala new file mode 100644 index 0000000..3fb29d8 --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/Trace4CatsTracer.scala @@ -0,0 +1,32 @@ +package trace4cats.natchez + +import cats.effect.kernel.{Resource, Sync} +import natchez.{EntryPoint, Kernel, Span} +import trace4cats.ToHeaders +import trace4cats.kernel.{SpanCompleter, SpanSampler} +import trace4cats.natchez.SpanKindConverter.convert + +object Trace4CatsTracer { + def entryPoint[F[_]: Sync]( + sampler: SpanSampler[F], + completer: SpanCompleter[F], + toHeaders: ToHeaders = ToHeaders.standard + ): EntryPoint[F] = + new EntryPoint[F] { + override def root(name: String, options: Span.Options): Resource[F, Span[F]] = + Trace4CatsSpan(trace4cats.Span.root(name, convert(options.spanKind), sampler, completer), toHeaders) + + override def continue(name: String, kernel: Kernel, options: Span.Options): Resource[F, Span[F]] = + Trace4CatsSpan( + toHeaders.toContext(KernelConverter.from(kernel)) match { + case None => trace4cats.Span.root(name, convert(options.spanKind), sampler, completer) + case Some(parent) => + trace4cats.Span.child(name, parent, convert(options.spanKind), sampler, completer) + }, + toHeaders + ) + + override def continueOrElseRoot(name: String, kernel: Kernel, options: Span.Options): Resource[F, Span[F]] = + continue(name, kernel, options) + } +} diff --git a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala similarity index 76% rename from modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala rename to modules/natchez/src/main/scala/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala index f36df51..66134d9 100644 --- a/modules/natchez/src/main/scala/io/janstenpickle/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala +++ b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/NatchezToTrace4Cats.scala @@ -1,11 +1,10 @@ -package io.janstenpickle.trace4cats.natchez.conversions +package trace4cats.natchez.conversions -import _root_.natchez.{Trace => NatchezTrace, TraceValue => V} +import _root_.natchez.{Span, Trace => NatchezTrace, TraceValue => V} import cats.Applicative import cats.syntax.foldable._ import cats.syntax.functor._ -import io.janstenpickle.trace4cats.inject.Trace -import io.janstenpickle.trace4cats.model.AttributeValue.{ +import trace4cats.model.AttributeValue.{ BooleanList, BooleanValue, DoubleList, @@ -15,9 +14,10 @@ import io.janstenpickle.trace4cats.model.AttributeValue.{ StringList, StringValue } -import io.janstenpickle.trace4cats.model.{AttributeValue, SpanKind, SpanStatus, TraceHeaders} -import io.janstenpickle.trace4cats.natchez.KernelConverter -import io.janstenpickle.trace4cats.{ErrorHandler, ToHeaders} +import trace4cats.model.{AttributeValue, SpanKind, SpanStatus, TraceHeaders} +import trace4cats.natchez.KernelConverter +import trace4cats.natchez.SpanKindConverter.convert +import trace4cats.{ErrorHandler, ToHeaders, Trace} trait NatchezToTrace4Cats { implicit def natchezToTrace4Cats[F[_]: Applicative](implicit trace: NatchezTrace[F]): Trace[F] = @@ -35,7 +35,7 @@ trait NatchezToTrace4Cats { case (k, LongList(v)) => k -> V.StringValue(v.value.mkString_("[", ", ", "]")) }: _*) override def span[A](name: String, kind: SpanKind, errorHandler: ErrorHandler)(fa: F[A]): F[A] = - trace.span(name)(fa) + trace.span(name, Span.Options.Defaults.withSpanKind(convert(kind)))(fa) override def headers(toHeaders: ToHeaders): F[TraceHeaders] = trace.kernel.map(KernelConverter.from) override def setStatus(status: SpanStatus): F[Unit] = Applicative[F].unit override def traceId: F[Option[String]] = trace.traceId diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala new file mode 100644 index 0000000..42a62a2 --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/Trace4CatsToNatchez.scala @@ -0,0 +1,51 @@ +package trace4cats.natchez.conversions + +import java.net.URI +import _root_.natchez.{Kernel, Trace => NatchezTrace, TraceValue => V} +import cats.Applicative +import cats.syntax.functor._ +import trace4cats.Trace +import trace4cats.model.AttributeValue.{BooleanValue, DoubleValue, StringValue} +import trace4cats.natchez.KernelConverter +import cats.effect.Resource +import cats.~> +import natchez.Span +import trace4cats.natchez.SpanKindConverter.convert + +trait Trace4CatsToNatchez { + implicit def trace4CatsToNatchez[F[_]: Applicative](implicit trace: Trace[F]): NatchezTrace[F] = + new NatchezTrace[F] { + + override def put(fields: (String, V)*): F[Unit] = + trace.putAll(fields.map { + case (k, V.StringValue(v)) => k -> StringValue(v) + case (k, V.NumberValue(v)) => k -> DoubleValue(v.doubleValue()) + case (k, V.BooleanValue(v)) => k -> BooleanValue(v) + }: _*) + + override def log(fields: (String, V)*): F[Unit] = put(fields: _*) + + override def log(event: String): F[Unit] = put("event" -> V.StringValue(event)) + + override def attachError(err: Throwable, fields: (String, V)*): F[Unit] = put( + ("error.message" -> V.StringValue(err.getMessage)) :: + ("error.class" -> V.StringValue(err.getClass.getSimpleName)) :: + fields.toList: _* + ) + + override def spanR(name: String, options: Span.Options): Resource[F, F ~> F] = Resource.pure { + new (F ~> F) { + def apply[A](fa: F[A]): F[A] = span(name, options)(fa) + } + } + + override def span[A](name: String, options: Span.Options)(k: F[A]): F[A] = + trace.span[A](name, convert(options.spanKind))(k) + + override def kernel: F[Kernel] = trace.headers.map(KernelConverter.to) + + override def traceId: F[Option[String]] = trace.traceId + + override def traceUri: F[Option[URI]] = Applicative[F].pure(None) + } +} diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/conversions/fromNatchez.scala b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/fromNatchez.scala new file mode 100644 index 0000000..8b02c8b --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/fromNatchez.scala @@ -0,0 +1,3 @@ +package trace4cats.natchez.conversions + +object fromNatchez extends NatchezToTrace4Cats diff --git a/modules/natchez/src/main/scala/trace4cats/natchez/conversions/toNatchez.scala b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/toNatchez.scala new file mode 100644 index 0000000..505d871 --- /dev/null +++ b/modules/natchez/src/main/scala/trace4cats/natchez/conversions/toNatchez.scala @@ -0,0 +1,3 @@ +package trace4cats.natchez.conversions + +object toNatchez extends Trace4CatsToNatchez diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 7a60687..9bad47a 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -2,19 +2,19 @@ import sbt._ object Dependencies { object Versions { - val scala212 = "2.12.15" - val scala213 = "2.13.8" - val scala3 = "3.1.1" + val scala212 = "2.12.17" + val scala213 = "2.13.10" + val scala3 = "3.3.0" - val trace4cats = "0.13.1" + val trace4cats = "0.14.2" - val natchez = "0.1.6" + val natchez = "0.3.1" val kindProjector = "0.13.2" val betterMonadicFor = "0.3.1" } - lazy val trace4catsInject = "io.janstenpickle" %% "trace4cats-inject" % Versions.trace4cats + lazy val trace4catsCore = "io.janstenpickle" %% "trace4cats-core" % Versions.trace4cats lazy val natchez = "org.tpolecat" %% "natchez-core" % Versions.natchez diff --git a/project/build.properties b/project/build.properties index c8fcab5..ee4c672 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.10.1 diff --git a/project/plugins.sbt b/project/plugins.sbt index 268ec89..2faee99 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.2") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") -addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.28") -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") +addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.46") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1")