Skip to content

Commit

Permalink
Updates and fix warnings (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol authored Nov 28, 2024
1 parent a0baff3 commit 8e8f920
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
18 changes: 8 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ Global / excludeLintKeys += scalaJSLinkerConfig

inThisBuild(
List(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalafixScalaBinaryVersion := scalaBinaryVersion.value,
organization := "tech.neander",
organizationName := "Neandertech",
sonatypeCredentialHost := "s01.oss.sonatype.org",
organization := "tech.neander",
organizationName := "Neandertech",
sonatypeCredentialHost := "s01.oss.sonatype.org",
resolvers ++= Resolver.sonatypeOssRepos("releases"),
homepage := Some(
url("https://github.com/neandertech/cue4s")
Expand All @@ -33,12 +30,12 @@ inThisBuild(
)

val Versions = new {
val Scala3 = "3.3.3"
val munit = "1.0.0"
val Scala3 = "3.3.4"
val munit = "1.0.2"
val scalaVersions = Seq(Scala3)
val fansi = "0.5.0"
val jna = "5.14.0"
val catsEffect = "3.5.3"
val catsEffect = "3.5.7"
}

lazy val munitSettings = Seq(
Expand Down Expand Up @@ -118,7 +115,7 @@ lazy val example = projectMatrix
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)),
nativeConfig ~= (_.withIncrementalCompilation(true)
.withSourceLevelDebuggingConfig(SourceLevelDebuggingConfig.enabled)),
nativeLink / mainClass := Some("cue4s_example.sync")
Compile / mainClass := Some("cue4s_example.sync")
)
.settings(superMatrix)

Expand Down Expand Up @@ -182,6 +179,7 @@ val scalafixRules = Seq(

val CICommands = Seq(
"clean",
"scalafixEnable",
"compile",
"test",
"checkDocs",
Expand Down
9 changes: 4 additions & 5 deletions modules/core/src/main/scala-jvm-native/PromptsPlatform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,17 @@ private trait PromptsPlatform:
prompt: Prompt[R] | PromptChain[R]
): Completion[R] =
prompt match
case p: Prompt[R] =>
case p: Prompt[?] =>
try
val handler = p.handler(terminal, out, colors)
val handler = p.asInstanceOf[Prompt[R]].handler(terminal, out, colors)

inputProvider.evaluate(handler)
finally
terminal.cursorShow()
inputProvider.close()
// ensure prompt doesn't forget cleaning up after itself

case c: PromptChain[R] =>
c.run([t] => (p: Prompt[t]) => sync(p))
case c: PromptChain[?] =>
c.asInstanceOf[PromptChain[R]].run([t] => (p: Prompt[t]) => sync(p))
end sync

def future[R](
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.10.1
sbt.version=1.10.5
10 changes: 4 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
resolvers ++= Resolver.sonatypeOssRepos("releases")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1")

// Code quality
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")

// Compiled documentation
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1")

// Scala.js and Scala Native
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.6")

addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")

addSbtPlugin("com.indoorvivants.snapshots" % "sbt-snapshots" % "0.0.7")
addSbtPlugin("com.indoorvivants.snapshots" % "sbt-snapshots" % "0.0.8")

0 comments on commit 8e8f920

Please sign in to comment.