Skip to content

Commit

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

/** The sole purpose of this method is to support binary compatibility with an intermediate
* version (namely, 15.2.0) 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 = "16.0.3")
def apply2[F[_] : Async : ToTry : ToFuture : MeasureDuration](
metrics: Option[ConsumerMetrics[F]] = None
): ConsumerOf[F] = apply1(metrics)

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

def mapK[G[_]](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ object ProducerOf {
}
}

/** The sole purpose of this method is to support binary compatibility with an intermediate
* version (namely, 15.2.0) 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 = "16.0.3")
def apply2[F[_] : MeasureDuration : ToTry : Async](
metrics: Option[ProducerMetrics[F]] = None
): ProducerOf[F] = apply1(metrics)

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

def mapK[G[_]](
Expand Down

0 comments on commit 9072ad6

Please sign in to comment.