From dc93e0921e3f1f8188db9702580d987d1cb1561b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Tue, 2 Jun 2026 14:21:21 +0200 Subject: [PATCH] deprecate(misc): mark Bidirectional @deprecated ahead of Scala 3 removal --- .../com/avsystem/commons/misc/Bidirectional.scala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/com/avsystem/commons/misc/Bidirectional.scala b/core/src/main/scala/com/avsystem/commons/misc/Bidirectional.scala index 4ab928fec..e8968ec01 100644 --- a/core/src/main/scala/com/avsystem/commons/misc/Bidirectional.scala +++ b/core/src/main/scala/com/avsystem/commons/misc/Bidirectional.scala @@ -1,7 +1,16 @@ package com.avsystem.commons package misc -/** Creates reversed partial function. */ +/** Creates reversed partial function. + * + * @deprecated + * `Bidirectional` is being removed in the Scala 3 release of scala-commons. The whitebox macro has no Scala 3 + * counterpart; write the reversed `PartialFunction` manually at call sites. + */ +@deprecated( + "Bidirectional will be removed in the Scala 3 release of scala-commons. Write the reversed PartialFunction manually.", + since = "2.29.0", +) object Bidirectional { def apply[A, B](pf: PartialFunction[A, B]): (PartialFunction[A, B], PartialFunction[B, A]) = macro com.avsystem.commons.macros.misc.BidirectionalMacro.impl[A, B]