Skip to content

Commit

Permalink
Use stable CE3
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Apr 10, 2021
1 parent 7fdcad8 commit 2d9ae7e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 27 deletions.
16 changes: 8 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ val commonSettings = Seq(
scalacOptions -= "-Xfatal-warnings",
scalacOptions ++= Seq("-Ymacro-annotations"),
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect" % "3.0.0-RC2"
"org.typelevel" %%% "cats-effect" % "3.0.2"
),
addCompilerPlugins,
addVersionSpecificScalacSettings
Expand Down Expand Up @@ -96,14 +96,14 @@ val next =
libraryDependencies ++= Seq(
// no macros
"org.typelevel" %% "cats-mtl" % "1.1.3",
"com.monovore" %% "decline-effect" % "2.0.0-RC1",
"org.http4s" %% "http4s-dsl" % "1.0.0-M19",
"org.http4s" %% "http4s-blaze-server" % "1.0.0-M19",
"org.http4s" %% "http4s-blaze-client" % "1.0.0-M19",
"org.http4s" %% "http4s-circe" % "1.0.0-M19",
"com.monovore" %% "decline-effect" % "2.0.0",
"org.http4s" %% "http4s-dsl" % "1.0.0-M21",
"org.http4s" %% "http4s-blaze-server" % "1.0.0-M21",
"org.http4s" %% "http4s-blaze-client" % "1.0.0-M21",
"org.http4s" %% "http4s-circe" % "1.0.0-M21",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"io.circe" %% "circe-parser" % "0.14.0-M4",
"io.circe" %% "circe-literal" % "0.14.0-M4",
"io.circe" %% "circe-parser" % "0.14.0-M5",
"io.circe" %% "circe-literal" % "0.14.0-M5",
// yes macros
"com.github.julien-truffaut" %% "monocle-macro" % "3.0.0-M4"
)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/com/kubukoz/next/ConfigLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import cats.Applicative
import cats.effect.std.Console
import fs2.io.file.Files
import cats.FlatMap
import cats.MonadThrow

trait ConfigLoader[F[_]] {
def saveConfig(config: Config): F[Unit]
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/kubukoz/next/Login.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.kubukoz.next

import cats.effect.MonadThrow
import cats.effect.kernel.Async
import cats.effect.kernel.Deferred
import cats.effect.kernel.Resource
Expand All @@ -24,6 +23,7 @@ import org.http4s.dsl.Http4sDsl
import org.http4s.headers.Authorization
import org.http4s.implicits._
import org.http4s.server.blaze.BlazeServerBuilder
import cats.MonadThrow

trait Login[F[_]] {
def server: F[Tokens]
Expand Down
20 changes: 3 additions & 17 deletions src/main/scala/com/kubukoz/next/Main.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.kubukoz.next

import java.io.EOFException
import java.util.concurrent.CancellationException

import cats.Monad
import cats.data.NonEmptyList
import cats.effect.ExitCode
Expand All @@ -14,6 +11,8 @@ import com.kubukoz.next.util.Config
import com.monovore.decline._
import com.monovore.decline.effect._

import java.io.EOFException

sealed trait Choice extends Product with Serializable

object Choice {
Expand Down Expand Up @@ -43,20 +42,7 @@ object Choice {

}

// Fun hack to avoid showing a stack trace if the user presses Ctrl+C.
// Hopefully this can be patterned out in CE3
object Main0 {

def main(args: Array[String]) =
try new Main().main(args)
catch {
case _: CancellationException => ()
case up: Throwable => throw up
}

}

class Main extends CommandIOApp(name = "spotify-next", header = "spotify-next: Gather great music.") {
object Main extends CommandIOApp(name = "spotify-next", header = "spotify-next: Gather great music.") {

import Program._

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/kubukoz/next/util/ConsoleRead.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kubukoz.next.util

import cats.effect.std.Console
import cats.effect.MonadThrow
import cats.MonadThrow
import cats.implicits._

trait ConsoleRead[A] {
Expand Down

0 comments on commit 2d9ae7e

Please sign in to comment.