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

(pekko) branch Remove-serialversion-remover-plugin created (now 7e97b46110)

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

hepin pushed a change to branch Remove-serialversion-remover-plugin
in repository https://gitbox.apache.org/repos/asf/pekko.git


      at 7e97b46110 chore: Remove serialversion-remover-plugin

This branch includes the following new commits:

     new 7e97b46110 chore: Remove serialversion-remover-plugin

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


(pekko) 01/01: chore: Remove serialversion-remover-plugin

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch Remove-serialversion-remover-plugin
in repository https://gitbox.apache.org/repos/asf/pekko.git

commit 7e97b461107bb7158be9267902712005e37f60da
Author: He-Pin <he...@gmail.com>
AuthorDate: Sat Sep 13 17:31:54 2025 +0800

    chore: Remove serialversion-remover-plugin
---
 build.sbt                                          | 19 +-------
 .../src/main/resources/plugin.properties           |  1 -
 .../src/main/scala/org/apache/pekko/Plugin.scala   | 51 ----------------------
 project/PekkoDisciplinePlugin.scala                |  2 +-
 4 files changed, 2 insertions(+), 71 deletions(-)

diff --git a/build.sbt b/build.sbt
index 9bd058dbc5..f1bc92a1c2 100644
--- a/build.sbt
+++ b/build.sbt
@@ -107,8 +107,7 @@ lazy val root = Project(id = "pekko", base = file("."))
       benchJmh,
       protobufV3,
       pekkoScalaNightly,
-      docs,
-      serialversionRemoverPlugin))
+      docs))
   .settings(
     Compile / headerCreate / unmanagedSources := (baseDirectory.value / "project").**("*.scala").get)
   .settings(PekkoBuild.welcomeSettings)
@@ -120,7 +119,6 @@ lazy val actor = pekkoModule("actor")
   .settings(AutomaticModuleName.settings("pekko.actor"))
   .settings(AddMetaInfLicenseFiles.actorSettings)
   .settings(VersionGenerator.settings)
-  .settings(serialversionRemoverPluginSettings)
   .enablePlugins(BoilerplatePlugin, SbtOsgi)
 
 lazy val actorTests = pekkoModule("actor-tests")
@@ -406,7 +404,6 @@ lazy val remote =
     .settings(OSGi.remote)
     .settings(Protobuf.settings)
     .settings(Test / parallelExecution := false)
-    .settings(serialversionRemoverPluginSettings)
     .enablePlugins(DependWalkerPlugin, SbtOsgi)
 
 lazy val remoteTests = pekkoModule("remote-tests")
@@ -602,20 +599,6 @@ lazy val billOfMaterials = Project("bill-of-materials", file("bill-of-materials"
     bomIncludeProjects := userProjects,
     description := s"${description.value} (depending on Scala ${CrossVersion.binaryScalaVersion(scalaVersion.value)})")
 
-lazy val serialversionRemoverPlugin =
-  Project(id = "serialVersionRemoverPlugin", base = file("plugins/serialversion-remover-plugin")).settings(
-    scalaVersion := Dependencies.scala3Version,
-    libraryDependencies += ("org.scala-lang" %% "scala3-compiler" % Dependencies.scala3Version),
-    Compile / doc / sources := Nil,
-    Compile / publishArtifact := false)
-
-lazy val serialversionRemoverPluginSettings = Seq(
-  Compile / scalacOptions ++= (
-    if (scalaVersion.value.startsWith("3."))
-      Seq("-Xplugin:" + (serialversionRemoverPlugin / Compile / Keys.`package`).value.getAbsolutePath.toString)
-    else Nil
-  ))
-
 def pekkoModule(moduleName: String): Project =
   Project(id = moduleName, base = file(moduleName))
     .enablePlugins(ReproducibleBuildsPlugin)
diff --git a/plugins/serialversion-remover-plugin/src/main/resources/plugin.properties b/plugins/serialversion-remover-plugin/src/main/resources/plugin.properties
deleted file mode 100644
index a1fe7dafa6..0000000000
--- a/plugins/serialversion-remover-plugin/src/main/resources/plugin.properties
+++ /dev/null
@@ -1 +0,0 @@
-pluginClass=org.apache.pekko.SerialVersionRemoverPlugin
diff --git a/plugins/serialversion-remover-plugin/src/main/scala/org/apache/pekko/Plugin.scala b/plugins/serialversion-remover-plugin/src/main/scala/org/apache/pekko/Plugin.scala
deleted file mode 100644
index a3c90fbfe8..0000000000
--- a/plugins/serialversion-remover-plugin/src/main/scala/org/apache/pekko/Plugin.scala
+++ /dev/null
@@ -1,51 +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) 2021-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko
-
-import dotty.tools.dotc.ast.Trees._
-import dotty.tools.dotc.ast.tpd
-import dotty.tools.dotc.core.Contexts.Context
-import dotty.tools.dotc.core.Symbols._
-import dotty.tools.dotc.plugins.{ PluginPhase, StandardPlugin }
-import dotty.tools.backend.jvm.GenBCode
-import dotty.tools.dotc.core.Flags._
-import dotty.tools.dotc.typer.FrontEnd
-
-class SerialVersionRemoverPlugin extends StandardPlugin {
-
-  val name = "serialversion-remover-plugin"
-  val description = "Remove SerialVersionUid annotation from traits"
-
-  override def init(options: List[String]): List[PluginPhase] = {
-    (new SerialVersionRemoverPhase()) :: Nil
-  }
-}
-
-class SerialVersionRemoverPhase extends PluginPhase {
-  import tpd._
-
-  val phaseName = "serialversion-remover"
-
-  override val runsBefore = Set(GenBCode.name)
-
-  override def transformTypeDef(tree: TypeDef)(implicit ctx: Context): Tree = {
-    val symbol = tree.symbol
-    if (tree.symbol.getAnnotation(defn.SerialVersionUIDAnnot).isDefined && tree.symbol.is(Trait)) {
-      tree.symbol.removeAnnotation(defn.SerialVersionUIDAnnot)
-    }
-
-    tree
-  }
-
-}
diff --git a/project/PekkoDisciplinePlugin.scala b/project/PekkoDisciplinePlugin.scala
index 876376178c..ef4a66b2f1 100644
--- a/project/PekkoDisciplinePlugin.scala
+++ b/project/PekkoDisciplinePlugin.scala
@@ -119,7 +119,7 @@ object PekkoDisciplinePlugin extends AutoPlugin {
   lazy val disciplineSettings =
     if (enabled) {
       nowarnSettings ++ Seq(
-        Compile / scalacOptions ++= Seq("-Xfatal-warnings"),
+        Compile / scalacOptions ++= (if (scalaVersion.value.startsWith("3.")) Nil else Seq("-Xfatal-warnings")),
         Test / scalacOptions --= testUndiscipline,
         Compile / javacOptions ++= (
           if (jvmIgnoreWarnings || scalaVersion.value.startsWith("3.") || nonFatalJavaWarningsFor(name.value)) {


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