You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2025/09/17 19:17:28 UTC

(pekko-http) branch main updated: remove use of pre213 and since213 annotations (#785)

This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git


The following commit(s) were added to refs/heads/main by this push:
     new 87ac38e6c remove use of pre213 and since213 annotations (#785)
87ac38e6c is described below

commit 87ac38e6ca0f332a2955a793e7bf934e65efc969
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Wed Sep 17 20:17:22 2025 +0100

    remove use of pre213 and since213 annotations (#785)
    
    * remove use of pre213 and since213 annotations
    
    * more changes
---
 build.sbt                                          |  6 ---
 .../pekko/http/scaladsl/model/HttpMessage.scala    | 10 -----
 .../scaladsl/model/headers/CacheDirective.scala    |  9 -----
 .../scaladsl/model/headers/LanguageRange.scala     |  5 ---
 .../http/scaladsl/model/headers/LinkValue.scala    |  6 +--
 .../http/scaladsl/model/headers/headers.scala      | 45 ----------------------
 .../server/directives/FormFieldDirectives.scala    |  2 -
 .../server/directives/RespondWithDirectives.scala  | 17 --------
 .../apache/pekko/http/ccompat/pre213macro.scala    | 34 ----------------
 .../apache/pekko/http/ccompat/since213macro.scala  | 34 ----------------
 .../apache/pekko/http/ccompat/pre213macro.scala    | 19 ---------
 .../apache/pekko/http/ccompat/since213macro.scala  | 18 ---------
 project/Pre213Preprocessor.scala                   | 35 -----------------
 13 files changed, 1 insertion(+), 239 deletions(-)

diff --git a/build.sbt b/build.sbt
index 33f3e739a..0f75cb85e 100644
--- a/build.sbt
+++ b/build.sbt
@@ -122,9 +122,6 @@ lazy val httpCore = project("http-core")
   .settings(scalaMacroSupport)
   .enablePlugins(BootstrapGenjavadoc)
   .enablePlugins(ReproducibleBuildsPlugin)
-  .enablePlugins(Pre213Preprocessor).settings(
-    Pre213Preprocessor.pre213Files := Seq(
-      "headers.scala", "HttpMessage.scala", "LanguageRange.scala", "CacheDirective.scala", "LinkValue.scala"))
   .disablePlugins(ScalafixPlugin)
 
 lazy val http = project("http")
@@ -135,9 +132,6 @@ lazy val http = project("http")
   .settings(
     Compile / scalacOptions += "-language:_")
   .settings(scalaMacroSupport)
-  .enablePlugins(Pre213Preprocessor).settings(
-    Pre213Preprocessor.pre213Files := Seq(
-      "scaladsl/server/directives/FormFieldDirectives.scala", "scaladsl/server/directives/RespondWithDirectives.scala"))
   .enablePlugins(BootstrapGenjavadoc, BoilerplatePlugin)
   .enablePlugins(ReproducibleBuildsPlugin)
 
diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpMessage.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpMessage.scala
index 8289c9dbc..1f32829c0 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpMessage.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpMessage.scala
@@ -30,7 +30,6 @@ import pekko.Done
 import pekko.actor.ClassicActorSystemProvider
 import org.parboiled2.CharUtils
 import pekko.util.{ ByteString, HashCode, OptionVal }
-import pekko.http.ccompat.{ pre213, since213 }
 import pekko.http.impl.util._
 import pekko.http.javadsl.{ model => jm }
 import pekko.http.scaladsl.util.FastFuture._
@@ -82,11 +81,6 @@ sealed trait HttpMessage extends jm.HttpMessage {
     entity.discardBytes()(SystemMaterializer(system).materializer)
 
   /** Returns a copy of this message with the list of headers set to the given ones. */
-  @pre213
-  def withHeaders(headers: HttpHeader*): Self = withHeaders(headers.toList)
-
-  /** Returns a copy of this message with the list of headers set to the given ones. */
-  @since213
   def withHeaders(firstHeader: HttpHeader, otherHeaders: HttpHeader*): Self =
     withHeaders(firstHeader +: otherHeaders.toList)
 
@@ -97,10 +91,6 @@ sealed trait HttpMessage extends jm.HttpMessage {
    * Returns a new message that contains all of the given default headers which didn't already
    * exist (by case-insensitive header name) in this message.
    */
-  @pre213
-  def withDefaultHeaders(defaultHeaders: HttpHeader*): Self = withDefaultHeaders(defaultHeaders.toList)
-
-  @since213
   def withDefaultHeaders(firstHeader: HttpHeader, otherHeaders: HttpHeader*): Self =
     withDefaultHeaders(firstHeader +: otherHeaders.toList)
 
diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/CacheDirective.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/CacheDirective.scala
index 3152c8c07..58b4fd30f 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/CacheDirective.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/CacheDirective.scala
@@ -20,7 +20,6 @@ import scala.annotation.{ tailrec, varargs }
 import scala.collection.immutable
 import pekko.http.impl.util._
 import pekko.http.javadsl.{ model => jm }
-import pekko.http.ccompat.{ pre213, since213 }
 
 sealed trait CacheDirective extends Renderable with jm.headers.CacheDirective {
   def value: String
@@ -93,10 +92,6 @@ object CacheDirectives {
    * http://tools.ietf.org/html/rfc7234#section-5.2.1.4
    */
   case object `no-cache` extends SingletonValueRenderable with RequestDirective with ResponseDirective {
-    @pre213
-    def apply(fieldNames: String*): `no-cache` =
-      new `no-cache`(immutable.Seq(fieldNames: _*))
-    @since213
     def apply(firstFieldName: String, otherFieldNames: String*): `no-cache` =
       new `no-cache`(firstFieldName +: otherFieldNames.toList)
   }
@@ -148,11 +143,7 @@ object CacheDirectives {
    */
   final case class `private`(fieldNames: immutable.Seq[String]) extends FieldNamesDirective with ResponseDirective
   object `private` {
-    @pre213
-    def apply(fieldNames: String*): `private` = new `private`(immutable.Seq(fieldNames: _*))
-    @since213
     def apply(): `private` = new `private`(immutable.Seq.empty)
-    @since213
     def apply(firstFieldName: String, otherFieldNames: String*): `private` =
       new `private`(firstFieldName +: otherFieldNames)
   }
diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LanguageRange.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LanguageRange.scala
index 56bdfbfe9..b5433d5ef 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LanguageRange.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LanguageRange.scala
@@ -20,7 +20,6 @@ import pekko.http.impl.util._
 import pekko.http.scaladsl.model.WithQValue
 import pekko.http.javadsl.{ model => jm }
 import pekko.http.impl.util.JavaMapping.Implicits._
-import pekko.http.ccompat.{ pre213, since213 }
 
 sealed trait LanguageRange extends jm.headers.LanguageRange with ValueRenderable with WithQValue[LanguageRange] {
   def qValue: Float
@@ -82,10 +81,6 @@ object Language {
       val tags = compoundTag.split('-')
       new Language(tags.head, immutable.Seq(tags.tail: _*))
     } else new Language(compoundTag, immutable.Seq.empty)
-  @pre213
-  def apply(primaryTag: String, subTags: String*): Language =
-    new Language(primaryTag, immutable.Seq(subTags: _*))
-  @since213
   def apply(primaryTag: String, firstSubTag: String, otherSubTags: String*): Language =
     new Language(primaryTag, firstSubTag +: otherSubTags)
 
diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LinkValue.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LinkValue.scala
index 449be0cc8..6bbd6cd85 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LinkValue.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/LinkValue.scala
@@ -15,13 +15,12 @@ package org.apache.pekko.http.scaladsl.model.headers
 
 import scala.collection.immutable
 import org.apache.pekko
-import org.parboiled2.CharPredicate
 import pekko.http.impl.util._
 import pekko.http.scaladsl.model._
 import pekko.http.javadsl.{ model => jm }
 import pekko.http.impl.util.JavaMapping.Implicits._
 import UriRendering.UriRenderer
-import pekko.http.ccompat.{ pre213, since213 }
+import org.parboiled2.CharPredicate
 
 final case class LinkValue(uri: Uri, params: immutable.Seq[LinkParam]) extends jm.headers.LinkValue
     with ValueRenderable {
@@ -36,9 +35,6 @@ final case class LinkValue(uri: Uri, params: immutable.Seq[LinkParam]) extends j
 }
 
 object LinkValue {
-  @pre213
-  def apply(uri: Uri, params: LinkParam*): LinkValue = apply(uri, immutable.Seq(params: _*))
-  @since213
   def apply(uri: Uri, firstParam: LinkParam, otherParams: LinkParam*): LinkValue = apply(uri, firstParam +: otherParams)
 }
 
diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/headers.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/headers.scala
index 5f639e39e..405bcc63c 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/headers.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/headers/headers.scala
@@ -29,7 +29,6 @@ import scala.annotation.tailrec
 import scala.collection.immutable
 import org.parboiled2.util.Base64
 import pekko.event.Logging
-import pekko.http.ccompat.{ pre213, since213 }
 import pekko.http.impl.util._
 import pekko.http.impl.model.parser.CharacterClasses.`attr-char`
 import pekko.http.javadsl.{ model => jm }
@@ -147,10 +146,6 @@ import pekko.http.impl.util.JavaMapping.Implicits._
 
 // https://tools.ietf.org/html/rfc7231#section-5.3.2
 object Accept extends ModeledCompanion[Accept] {
-  @pre213
-  def apply(mediaRanges: MediaRange*): Accept =
-    apply(immutable.Seq(mediaRanges: _*))
-  @since213
   def apply(firstMediaRange: MediaRange, otherMediaRanges: MediaRange*): Accept =
     apply(firstMediaRange +: otherMediaRanges)
   implicit val mediaRangesRenderer: Renderer[immutable.Iterable[MediaRange]] = Renderer.defaultSeqRenderer[MediaRange] // cache
@@ -185,13 +180,8 @@ final case class `Accept-Charset`(charsetRanges: immutable.Seq[HttpCharsetRange]
 
 // https://tools.ietf.org/html/rfc7231#section-5.3.4
 object `Accept-Encoding` extends ModeledCompanion[`Accept-Encoding`] {
-  @pre213
-  def apply(encodings: HttpEncodingRange*): `Accept-Encoding` =
-    apply(immutable.Seq(encodings: _*))
-  @since213
   def apply(): `Accept-Encoding` =
     apply(immutable.Seq.empty)
-  @since213
   def apply(firstEncoding: HttpEncodingRange, otherEncodings: HttpEncodingRange*): `Accept-Encoding` =
     apply(firstEncoding +: otherEncodings)
   implicit val encodingsRenderer: Renderer[immutable.Iterable[HttpEncodingRange]] =
@@ -226,13 +216,8 @@ final case class `Accept-Language`(languages: immutable.Seq[LanguageRange]) exte
 
 // https://tools.ietf.org/html/rfc7233#section-2.3
 object `Accept-Ranges` extends ModeledCompanion[`Accept-Ranges`] {
-  @pre213
-  def apply(rangeUnits: RangeUnit*): `Accept-Ranges` =
-    apply(immutable.Seq(rangeUnits: _*))
-  @since213
   def apply(): `Accept-Ranges` =
     apply(immutable.Seq.empty)
-  @since213
   def apply(firstRangeUnit: RangeUnit, otherRangeUnits: RangeUnit*): `Accept-Ranges` =
     apply(firstRangeUnit +: otherRangeUnits)
   implicit val rangeUnitsRenderer: Renderer[immutable.Iterable[RangeUnit]] = Renderer.defaultSeqRenderer[RangeUnit] // cache
@@ -257,10 +242,6 @@ final case class `Access-Control-Allow-Credentials`(allow: Boolean)
 
 // https://www.w3.org/TR/cors/#access-control-allow-headers-response-header
 object `Access-Control-Allow-Headers` extends ModeledCompanion[`Access-Control-Allow-Headers`] {
-  @pre213
-  def apply(headers: String*): `Access-Control-Allow-Headers` =
-    apply(immutable.Seq(headers: _*))
-  @since213
   def apply(firstHeader: String, otherHeaders: String*): `Access-Control-Allow-Headers` =
     apply(firstHeader +: otherHeaders)
   implicit val headersRenderer: Renderer[immutable.Iterable[String]] = Renderer.defaultSeqRenderer[String] // cache
@@ -277,10 +258,6 @@ final case class `Access-Control-Allow-Headers`(headers: immutable.Seq[String])
 
 // https://www.w3.org/TR/cors/#access-control-allow-methods-response-header
 object `Access-Control-Allow-Methods` extends ModeledCompanion[`Access-Control-Allow-Methods`] {
-  @pre213
-  def apply(methods: HttpMethod*): `Access-Control-Allow-Methods` =
-    apply(immutable.Seq(methods: _*))
-  @since213
   def apply(firstMethod: HttpMethod, otherMethods: HttpMethod*): `Access-Control-Allow-Methods` =
     apply(firstMethod +: otherMethods)
   implicit val methodsRenderer: Renderer[immutable.Iterable[HttpMethod]] = Renderer.defaultSeqRenderer[HttpMethod] // cache
@@ -318,10 +295,6 @@ final case class `Access-Control-Allow-Origin` private (range: HttpOriginRange)
 
 // https://www.w3.org/TR/cors/#access-control-expose-headers-response-header
 object `Access-Control-Expose-Headers` extends ModeledCompanion[`Access-Control-Expose-Headers`] {
-  @pre213
-  def apply(headers: String*): `Access-Control-Expose-Headers` =
-    apply(immutable.Seq(headers: _*))
-  @since213
   def apply(firstHeader: String, otherHeaders: String*): `Access-Control-Expose-Headers` =
     apply(firstHeader +: otherHeaders)
   implicit val headersRenderer: Renderer[immutable.Iterable[String]] = Renderer.defaultSeqRenderer[String] // cache
@@ -346,10 +319,6 @@ final case class `Access-Control-Max-Age`(deltaSeconds: Long) extends jm.headers
 
 // https://www.w3.org/TR/cors/#access-control-request-headers-request-header
 object `Access-Control-Request-Headers` extends ModeledCompanion[`Access-Control-Request-Headers`] {
-  @pre213
-  def apply(headers: String*): `Access-Control-Request-Headers` =
-    apply(immutable.Seq(headers: _*))
-  @since213
   def apply(firstHeader: String, otherHeaders: String*): `Access-Control-Request-Headers` =
     apply(firstHeader +: otherHeaders)
   implicit val headersRenderer: Renderer[immutable.Iterable[String]] = Renderer.defaultSeqRenderer[String] // cache
@@ -381,13 +350,8 @@ final case class Age(deltaSeconds: Long) extends jm.headers.Age with ResponseHea
 
 // https://tools.ietf.org/html/rfc7231#section-7.4.1
 object Allow extends ModeledCompanion[Allow] {
-  @pre213
-  def apply(methods: HttpMethod*): Allow =
-    apply(immutable.Seq(methods: _*))
-  @since213
   def apply(): `Allow` =
     apply(immutable.Seq.empty)
-  @since213
   def apply(firstMethod: HttpMethod, otherMethods: HttpMethod*): Allow =
     apply(firstMethod +: otherMethods)
   implicit val methodsRenderer: Renderer[immutable.Iterable[HttpMethod]] = Renderer.defaultSeqRenderer[HttpMethod] // cache
@@ -564,9 +528,6 @@ final case class `Content-Type` private[pekko] (contentType: ContentType) extend
 object Cookie extends ModeledCompanion[Cookie] {
   def apply(first: HttpCookiePair, more: HttpCookiePair*): Cookie = apply(immutable.Seq(first +: more: _*))
   def apply(name: String, value: String): Cookie = apply(HttpCookiePair(name, value))
-  @pre213
-  def apply(values: (String, String)*): Cookie = apply(values.map(HttpCookiePair(_)).toList)
-  @since213
   def apply(first: (String, String), more: (String, String)*): Cookie = apply((first +: more).map(HttpCookiePair(_)))
   implicit val cookiePairsRenderer: Renderer[immutable.Iterable[HttpCookiePair]] =
     Renderer.seqRenderer[HttpCookiePair](separator = "; ") // cache
@@ -716,9 +677,6 @@ final case class `Last-Modified`(date: DateTime) extends jm.headers.LastModified
 object Link extends ModeledCompanion[Link] {
   def apply(uri: Uri, first: LinkParam, more: LinkParam*): Link =
     apply(immutable.Seq(LinkValue(uri, first +: more.toList)))
-  @pre213
-  def apply(values: LinkValue*): Link = apply(immutable.Seq(values: _*))
-  @since213
   def apply(firstValue: LinkValue, otherValues: LinkValue*): Link = apply(firstValue +: otherValues)
 
   implicit val valuesRenderer: Renderer[immutable.Iterable[LinkValue]] = Renderer.defaultSeqRenderer[LinkValue] // cache
@@ -744,9 +702,6 @@ final case class Location(uri: Uri) extends jm.headers.Location with ResponseHea
 
 // https://tools.ietf.org/html/rfc6454#section-7
 object Origin extends ModeledCompanion[Origin] {
-  @pre213
-  def apply(origins: HttpOrigin*): Origin = apply(immutable.Seq(origins: _*))
-  @since213
   def apply(firstOrigin: HttpOrigin, otherOrigins: HttpOrigin*): Origin = apply(firstOrigin +: otherOrigins)
 }
 final case class Origin(origins: immutable.Seq[HttpOrigin]) extends jm.headers.Origin with RequestHeader
diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FormFieldDirectives.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FormFieldDirectives.scala
index aa5977869..06a3ddf9f 100644
--- a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FormFieldDirectives.scala
+++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FormFieldDirectives.scala
@@ -27,8 +27,6 @@ import scala.collection.immutable
 import scala.concurrent.Future
 import scala.util.{ Failure, Success }
 import BasicDirectives._
-import pekko.http.ccompat.pre213
-import pekko.http.ccompat.since213
 
 /**
  * @groupname form Form field directives
diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/RespondWithDirectives.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/RespondWithDirectives.scala
index 97fe3ffd8..52e75f482 100644
--- a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/RespondWithDirectives.scala
+++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/RespondWithDirectives.scala
@@ -16,7 +16,6 @@ package directives
 
 import org.apache.pekko
 import pekko.http.scaladsl.model._
-import pekko.http.ccompat._
 import scala.collection.immutable
 
 /**
@@ -47,11 +46,6 @@ trait RespondWithDirectives {
    *
    * @group response
    */
-  @pre213
-  def respondWithHeaders(responseHeaders: HttpHeader*): Directive0 =
-    respondWithHeaders(responseHeaders.toList)
-
-  @since213
   def respondWithHeaders(firstHeader: HttpHeader, otherHeaders: HttpHeader*): Directive0 =
     respondWithHeaders(firstHeader +: otherHeaders.toList)
 
@@ -69,17 +63,6 @@ trait RespondWithDirectives {
    *
    * @group response
    */
-  @pre213
-  def respondWithDefaultHeaders(responseHeaders: HttpHeader*): Directive0 =
-    respondWithDefaultHeaders(responseHeaders.toList)
-
-  /**
-   * Adds the given response headers to all HTTP responses of its inner Route,
-   * if a header already exists it is not added again.
-   *
-   * @group response
-   */
-  @since213
   def respondWithDefaultHeaders(firstHeader: HttpHeader, otherHeaders: HttpHeader*): Directive0 =
     respondWithDefaultHeaders(firstHeader +: otherHeaders.toList)
 
diff --git a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
deleted file mode 100644
index 1edf051ef..000000000
--- a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2019-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.ccompat
-
-import scala.annotation.StaticAnnotation
-import scala.language.experimental.macros
-import scala.reflect.macros.blackbox.Context
-
-object pre213macro {
-  def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = annottees match {
-    case Seq(method) =>
-      import c.universe._
-      if (scala.util.Properties.versionNumberString.startsWith("2.13"))
-        c.Expr[Nothing](EmptyTree)
-      else
-        method
-    case _ =>
-      c.abort(c.enclosingPosition, "Please annotate single expressions")
-  }
-}
-class pre213 extends StaticAnnotation {
-  def macroTransform(annottees: Any*): Any = macro pre213macro.impl
-}
diff --git a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
deleted file mode 100644
index f118a9abb..000000000
--- a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2019-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.ccompat
-
-import scala.annotation.StaticAnnotation
-import scala.language.experimental.macros
-import scala.reflect.macros.blackbox.Context
-
-object since213macro {
-  def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = annottees match {
-    case Seq(method) =>
-      import c.universe._
-      if (scala.util.Properties.versionNumberString.startsWith("2.13"))
-        method
-      else
-        c.Expr[Nothing](EmptyTree)
-    case _ =>
-      c.abort(c.enclosingPosition, "Please annotate single expressions")
-  }
-}
-class since213 extends StaticAnnotation {
-  def macroTransform(annottees: Any*): Any = macro since213macro.impl
-}
diff --git a/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/pre213macro.scala b/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/pre213macro.scala
deleted file mode 100644
index 21dd8a0c2..000000000
--- a/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/pre213macro.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2019-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.ccompat
-
-import scala.annotation.StaticAnnotation
-
-// FIXME: need to implement or we will resurrect some ugly things (or remove 2.12 support)
-class pre213 extends StaticAnnotation
diff --git a/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/since213macro.scala b/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/since213macro.scala
deleted file mode 100644
index b20ef66ee..000000000
--- a/parsing/src/main/scala-3/org/apache/pekko/http/ccompat/since213macro.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2019-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.ccompat
-
-import scala.annotation.StaticAnnotation
-
-class since213 extends StaticAnnotation
diff --git a/project/Pre213Preprocessor.scala b/project/Pre213Preprocessor.scala
deleted file mode 100644
index 79a91c77a..000000000
--- a/project/Pre213Preprocessor.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-import sbt._
-import Keys._
-
-object Pre213Preprocessor extends AutoPlugin {
-  val pre213Files = settingKey[Seq[String]]("files that should be edited for pre213 annotation")
-
-  val pattern = """(?s)@pre213.*?@since213""".r
-
-  override def projectSettings: Seq[Def.Setting[_]] = {
-    Compile / sources := {
-      if (scalaVersion.value.startsWith("3")) {
-        val filter: File => Boolean =
-          f => pre213Files.value.exists(suffix => f.getAbsolutePath.replace("\\", "//").endsWith(suffix))
-        (Compile / sources).value.map { s =>
-          if (filter(s)) {
-            val data = IO.read(s)
-            val targetFile = sourceManaged.value / s.getName
-            val newData = pattern.replaceAllIn(data, "@since213")
-            IO.write(targetFile, newData)
-            targetFile
-          } else s
-        }
-      } else (Compile / sources).value
-    }
-  }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org