Skip to content

Releases: profunktor/redis4cats

0.10.0-RC2

11 May 20:39
Compare
Choose a tag to compare

More breaking changes

  • #283 The exec_ function has been renamed to filterExec (transactions and pipelining).
  • #284 The API has been greatly simplified while also improving type inference

A new quick start section has been added to the documentation:

import cats.effect._
import cats.implicits._
import dev.profunktor.redis4cats.Redis
import dev.profunktor.redis4cats.effect.Log.NoOp._

object QuickStart extends IOApp {

  override def run(args: List[String]): IO[ExitCode] =
    Redis[IO].utf8("redis://localhost").use { cmd =>
      for {
        _ <- cmd.set("foo", "123")
        x <- cmd.get("foo")
        _ <- cmd.setNx("foo", "should not happen")
        y <- cmd.get("foo")
        _ <- IO(println(x === y)) // true
      } yield ExitCode.Success
    }

}

New constructors

  • Redis[IO].utf8("redis://localhost")
  • Redis[IO].simple("redis://localhost", longCodec)
  • Redis[IO].clusterUtf8("redis://localhost:30001")
  • Redis[IO].cluster("redis://localhost:30001", someCodec)

This greatly simplifies the creation of RedisCommands[F, K, V] while improving type inference (note that K and V are inferred from the codec passed as an argument) thanks to the partially applied trick.

0.10.0-RC1

09 May 15:46
4dbad69
Compare
Choose a tag to compare

Breaking changes

Package rename

Before Now
dev.profunktor.redis4cats.algebra.RedisCommands dev.profunktor.redis4cats.RedisCommands
dev.profunktor.redis4cats.interpreter.Redis dev.profunktor.redis4cats.Redis
dev.profunktor.redis4cats.domain._ dev.profunktor.redis4cats.data._
dev.profunktor.redis4cats.interpreter.pubsub.PubSub dev.profunktor.redis4cats.pubsub.PubSub
dev.profunktor.redis4cats.interpreter.streams.RedisStream dev.profunktor.redis4cats.streams.RedisStream
dev.profunktor.redis4cats.streams._ dev.profunktor.redis4cats.pubsub.data._ (*)
dev.profunktor.redis4cats.streams._ dev.profunktor.redis4cats.streams.data._ (*)

(*) It has been split into two different files.

Typed-transactions & Pipelining

Typed-transactions and pipelining now make use of a custom HLists. Types are now fully inferred. For example:

//type Cmd = IO[Unit] :: IO[Unit] :: IO[Option[String]] :: IO[Unit] :: IO[Unit] :: IO[Option[String]] :: HNil
val operations =
  cmd.set(key1, "sad") :: cmd.set(key2, "windows") :: cmd.get(key1) ::
      cmd.set(key1, "nix") :: cmd.set(key2, "linux") :: cmd.get(key1) :: HNil

//type Res = Option[String] :: Option[String] :: HNil
val prog =
  RedisTransaction(cmd)
    .exec_(operations)
    .flatMap {
      case res1 ~: res2 ~: HNil =>
        putStrLn(s"res1: $res1, res2: $res2")
    }
    .onError {
      case TransactionAborted =>
        putStrLn("[Error] - Transaction Aborted")
      case TransactionDiscarded =>
        putStrLn("[Error] - Transaction Discarded")
      case _: TimeoutException =>
        putStrLn("[Error] - Timeout")
    }

All Changes

  • #245 Scan command impl by @oskin1
  • #248 [Docs] - Rename fs2-redis to redis4cats by @zaneli
  • #252 [Docs] - Add documentation section to README by @ybasket
  • #269 Fix bugs in zRevRangeWithScores and zRevRangeByScoreWithScores by @taeguk
  • #273 Typed transactions using custom HList
  • #276 Simpler package naming
  • #277 Pipelining using HLists
  • #278 Filter Unit types from HList

Dependency updates

  • #256 fs2-core-2.3.0
  • #279 cats-effect-2.1.3
  • #270 lettuce-core-5.3.0.RELEASE

Thanks to all the contributors! 🎉

0.9.4

02 Mar 17:08
Compare
Choose a tag to compare

NOTE: Users making use of transactions are encouraged to upgrade immediately.

Changes

#225 Add support for scripting by @ybasket
#233 Fixing hanging transactions by @gvolpe
#235 Fix timeout unit for BLPOP, BRPOP and BRPOPLPUSH by @ybasket
#236 Let blocking commands take Duration instead of FiniteDuration by @ybasket

Dependency updates

#232 cats-core-2.1.1
#223 lettuce-core-5.2.2.RELEASE
#222 cats-effect-2.1.1
#219 fs2-core-2.2.2

0.9.3

24 Jan 16:05
Compare
Choose a tag to compare

Changes

  • Add liftK to RedisCommands to allow changing effect by @Doikor
  • Removing test-support module in favor of docker-compose by @gvolpe

Internal changes

Dependency updates

0.9.2

31 Dec 17:59
Compare
Choose a tag to compare

Changes

Internal changes

Dependency updates

0.9.1

22 Oct 04:56
Compare
Choose a tag to compare

Changes

Dependency Updates

  • #160 log4cats-1.0.1
  • #153 lettuce-5.2.0.RELEASE
  • #142 fs2-core-2.0.1

Thanks to all the contributors for this release! 🎉

0.9.0

15 Sep 01:01
8804de9
Compare
Choose a tag to compare

Changes

  • #135 Support numerics other than primitives in range by @tomaszym
  • #132 Unifying dependencies for the different Scala versions by @gvolpe
  • #122 Better thread shifting semantics on failure conditions by @calvinlfer

Dependency updates

  • #134 fs2-core-2.0.0
  • #133 log4cats-1.0.0
  • #131 cats-effect-2.0.0
  • #114 lettuce-core-5.1.8.RELEASE

Thanks to all the contributors who made this possible!

0.8.3

17 Jun 19:20
Compare
Choose a tag to compare

First release for Scala 2.13.0 🎉 ! And also for Scala 2.12.8 as usual.

Changes

Dependency updates for Scala 2.12.x

  • #102 scalatest-3.0.8
  • #101 fs2-core-1.0.5
  • #100 lettuce-core-5.1.17.RELEASE
  • #98 cats-core-1.6.1

Dependency updates for Scala 2.13.x

  • cats-core-2.0.0-M4
  • cats-effect-2.0.0-M4
  • fs2-core-1.1.0-M1
  • log4cats-0.4.0-M1
  • scalatest-3.1.0-SNAP13

Thanks to all the contributors!

0.8.2

02 Jun 00:05
Compare
Choose a tag to compare

Changes

  • #97 Commands pipelining using manual flushing

Dependency updates

  • #96 cats-effect-1.3.1

0.8.1

20 May 19:29
18aa968
Compare
Choose a tag to compare

The project has been renamed from fs2redis to redis4cats. Package name is now different as well: replace all com.github.gvolpe.fs2redis by dev.profunktor.redis4cats.

Changes

  • #95 Adding support for single-shard transactions
  • #92 Avoid exposing Java stuff like codecs, etc
  • #91 Renaming files and packages
  • #90 Organization changes