From 77628378a5ec696cdaf10bc6c83698843bd5d6d6 Mon Sep 17 00:00:00 2001 From: Matt Hicks Date: Sat, 15 Oct 2022 21:23:07 -0500 Subject: [PATCH] Fixes and updates --- build.sbt | 13 ++++++++----- project/plugins.sbt | 2 +- .../main/scala/scribe/slf4j/ScribeMDCAdapter.scala | 13 +++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index cbcc502c3..9d8dfd873 100644 --- a/build.sbt +++ b/build.sbt @@ -12,12 +12,12 @@ val allScalaVersions = scala3 :: scala2 val compatScalaVersions = List(scala213, scala212) val scalaJVMVersions = allScalaVersions val scalaJSVersions = allScalaVersions -val scalaNot211Versions = List(scala3, scala213, scala212) -val scalaNativeVersions = scalaNot211Versions +val scalaNativeVersions = allScalaVersions +val scalaAllExcept211Versions = List(scala213, scala212, scala3) name := "scribe" ThisBuild / organization := "com.outr" -ThisBuild / version := "3.10.3" +ThisBuild / version := "3.10.4-SNAPSHOT" ThisBuild / scalaVersion := scala213 ThisBuild / scalacOptions ++= Seq("-unchecked", "-deprecation") ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8") @@ -163,10 +163,13 @@ lazy val cats = crossProject(JVMPlatform, JSPlatform, NativePlatform) Test / publishArtifact := false ) .jsSettings( - crossScalaVersions := scalaNot211Versions + crossScalaVersions := scalaAllExcept211Versions ) .jvmSettings( - crossScalaVersions := scalaNot211Versions + crossScalaVersions := scalaAllExcept211Versions + ) + .jsSettings( + crossScalaVersions := scalaAllExcept211Versions ) .dependsOn(core) diff --git a/project/plugins.sbt b/project/plugins.sbt index a68d0d7b0..eaa2bc15d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.y") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13") diff --git a/slf4j2/src/main/scala/scribe/slf4j/ScribeMDCAdapter.scala b/slf4j2/src/main/scala/scribe/slf4j/ScribeMDCAdapter.scala index b1b256c04..9c5bc6f54 100644 --- a/slf4j2/src/main/scala/scribe/slf4j/ScribeMDCAdapter.scala +++ b/slf4j2/src/main/scala/scribe/slf4j/ScribeMDCAdapter.scala @@ -25,4 +25,17 @@ object ScribeMDCAdapter extends MDCAdapter { case (key, value) => put(key, value) } } + + // TODO: Support stacking + override def pushByKey(key: String, value: String): Unit = put(key, value) + + override def popByKey(key: String): String = { + val value = get(key) + remove(key) + value + } + + override def getCopyOfDequeByKey(key: String): util.Deque[String] = ??? + + override def clearDequeByKey(key: String): Unit = remove(key) } \ No newline at end of file