From b9fa1fd1176757e1f010dd494945bb31795500b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Tue, 2 Jun 2026 14:27:32 +0200 Subject: [PATCH 1/2] deprecate(misc): mark Delegation @deprecated ahead of Scala 3 removal --- .../com/avsystem/commons/misc/Delegation.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala b/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala index 9023eeee2..bf0271ca8 100644 --- a/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala +++ b/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala @@ -2,11 +2,24 @@ package com.avsystem.commons package misc /** A typeclass which witnesses that type `A` can be wrapped into trait or abstract class `B` + * + * @deprecated + * `Delegation` is being removed in the Scala 3 release of scala-commons. The blackbox macros have no Scala 3 + * counterpart; write the delegating wrapper manually + * (`new TargetTrait { def x = source.x; ... }`). */ +@deprecated( + "Delegation will be removed in the Scala 3 release of scala-commons. Write the delegating wrapper manually.", + since = "2.29.0", +) trait Delegation[A, B] { def delegate(a: A): B } +@deprecated( + "Delegation will be removed in the Scala 3 release of scala-commons. Write the delegating wrapper manually.", + since = "2.29.0", +) object Delegation { implicit def materializeDelegation[A, B]: Delegation[A, B] = macro com.avsystem.commons.macros.misc.DelegationMacros.materializeDelegation[A, B] From 6ab6cd70e3683b91e331338b63f17fe096fd62f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Tue, 2 Jun 2026 14:40:15 +0200 Subject: [PATCH 2/2] fix(misc): reformat `@deprecated` Scaladoc for Delegation --- core/src/main/scala/com/avsystem/commons/misc/Delegation.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala b/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala index bf0271ca8..765b5c932 100644 --- a/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala +++ b/core/src/main/scala/com/avsystem/commons/misc/Delegation.scala @@ -5,8 +5,7 @@ package misc * * @deprecated * `Delegation` is being removed in the Scala 3 release of scala-commons. The blackbox macros have no Scala 3 - * counterpart; write the delegating wrapper manually - * (`new TargetTrait { def x = source.x; ... }`). + * counterpart; write the delegating wrapper manually (`new TargetTrait { def x = source.x; ... }`). */ @deprecated( "Delegation will be removed in the Scala 3 release of scala-commons. Write the delegating wrapper manually.",