Skip to content

Commit

Permalink
Add ProducerOf.apply2/ConsumerOf.apply2 for binary compatibility (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
Z1kkurat authored Aug 24, 2023
1 parent 17af1e3 commit b3fe2de
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ object ConsumerOf {
}
}

/** The sole purpose of this method is to support binary compatibility with an intermediate
* version (namely, 11.15.1) which had `apply1` method using `MeasureDuration` from `smetrics`
* and `apply2` using `MeasureDuration` from `cats-helper`.
* This should not be used and should be removed in a reasonable amount of time.
*/
@deprecated("Use `apply1`", since = "11.16.3")
def apply2[F[_] : Concurrent : ContextShift : ToTry : ToFuture : MeasureDuration : Clock](
executorBlocking: ExecutionContext,
metrics: Option[ConsumerMetrics[F]] = None
): ConsumerOf[F] = apply1(executorBlocking, metrics)

implicit class ConsumerOfOps[F[_]](val self: ConsumerOf[F]) extends AnyVal {

def mapK[G[_]: Applicative: Defer](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ object ProducerOf {
}
}

/** The sole purpose of this method is to support binary compatibility with an intermediate
* version (namely, 11.15.1) which had `apply1` method using `MeasureDuration` from `smetrics`
* and `apply2` using `MeasureDuration` from `cats-helper`.
* This should not be used and should be removed in a reasonable amount of time.
*/
@deprecated("Use `apply1`", since = "11.16.3")
def apply2[F[_]: Concurrent: ContextShift: MeasureDuration: ToTry](
executorBlocking: ExecutionContext,
metrics: Option[ProducerMetrics[F]] = None
): ProducerOf[F] = apply1(executorBlocking, metrics)

implicit class ProducerOfOps[F[_]](val self: ProducerOf[F]) extends AnyVal {

def mapK[G[_]: Monad: Defer](
Expand Down

0 comments on commit b3fe2de

Please sign in to comment.