-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
Pekko build is set up to fail if we get compile warnings.
Scala nightly 2.13.17-bin-6a23d33
pekko-actor but there could be more in other modules
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala:184:15: Calls to parameterless method toArray will be easy to mistake for calls to final override def toArray[B >: Byte](implicit arg0: scala.reflect.ClassTag[B]): Array[B], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.util.ByteString.ByteString1C
[error] final class ByteString1C private (private val bytes: Array[Byte]) extends CompactByteString {
[error] ^
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala:315:15: Calls to parameterless method toArray will be easy to mistake for calls to final override def toArray[B >: Byte](implicit arg0: scala.reflect.ClassTag[B]): Array[B], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.util.ByteString.ByteString1
[error] final class ByteString1 private (private val bytes: Array[Byte], private val startIndex: Int, val length: Int)
[error] ^
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala:547:15: Calls to parameterless method toArray will be easy to mistake for calls to final override def toArray[B >: Byte](implicit arg0: scala.reflect.ClassTag[B]): Array[B], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.util.ByteString.ByteStrings
[error] final class ByteStrings private (private[pekko] val bytestrings: Vector[ByteString1], val length: Int)
[error] ^
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala:922:29: Calls to parameterless method toArray will be easy to mistake for calls to final override def toArray[B >: Byte](implicit arg0: scala.reflect.ClassTag[B]): Array[B], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.util.ByteString
[error] protected[ByteString] def toArray: Array[Byte] = toArray[Byte]
[error] ^
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala:1160:23: Calls to parameterless method toArray will be easy to mistake for calls to final override def toArray[B >: Byte](implicit arg0: scala.reflect.ClassTag[B]): Array[B], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.util.CompactByteString
[error] sealed abstract class CompactByteString extends ByteString with Serializable {
[error] ^
[error] /Users/pj.fanning/code/pekko/actor/src/main/scala/org/apache/pekko/actor/Address.scala:78:79: method productHash in object MurmurHash3 is deprecated (since 2.13.17): use `caseClassHash` instead
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=deprecation, site=org.apache.pekko.actor.Address.hashCode, origin=scala.util.hashing.MurmurHash3.productHash, version=2.13.17
[error] @transient override lazy val hashCode: Int = scala.util.hashing.MurmurHash3.productHash(this)
[error] ^
[error] 6 errors found
[error] (actor / Compile / compileIncremental) Compilation failed
pekko-stream and pekko-testkit
[info] compiling 202 Scala sources and 4 Java sources to /Users/pj.fanning/code/pekko/stream/target/scala-2.13/classes ...
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala:53:16: method createLogicAndMaterializedValue has an inferred structural type: (org.apache.pekko.stream.stage.GraphStageLogic with org.apache.pekko.stream.stage.OutHandler with org.apache.pekko.stream.scaladsl.SourceQueueWithComplete[T] with org.apache.pekko.stream.stage.StageLogging{def buffer: org.apache.pekko.stream.impl.Buffer[T]; def buffer_=(x$1: org.apache.pekko.stream.impl.Buffer[T]): Unit; def pendingOffers: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]]; def pendingOffers_=(x$1: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]]): Unit; def terminating: Boolean; def terminating_=(x$1: Boolean): Unit}, org.apache.pekko.stream.stage.GraphStageLogic with org.apache.pekko.stream.stage.OutHandler with org.apache.pekko.stream.scaladsl.SourceQueueWithComplete[T] with org.apache.pekko.stream.stage.StageLogging{def buffer: org.apache.pekko.stream.impl.Buffer[T]; def buffer_=(x$1: org.apache.pekko.stream.impl.Buffer[T]): Unit; def pendingOffers: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]]; def pendingOffers_=(x$1: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]]): Unit; def terminating: Boolean; def terminating_=(x$1: Boolean): Unit})
[error] members that can be accessed with a reflective call: def buffer: org.apache.pekko.stream.impl.Buffer[T],def buffer_=(x$1: org.apache.pekko.stream.impl.Buffer[T]): Unit,def pendingOffers: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]],def pendingOffers_=(x$1: org.apache.pekko.stream.impl.Buffer[org.apache.pekko.stream.impl.QueueSource.Offer[T]]): Unit,def terminating: Boolean,def terminating_=(x$1: Boolean): Unit
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.QueueSource.createLogicAndMaterializedValue
[error] override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
[error] ^
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala:48:15: method createStageLogic has an inferred structural type: org.apache.pekko.stream.stage.GraphStageLogic{val subInlet: this.SubSinkInlet[U]; val subOutlet: this.SubSourceOutlet[T]}
[error] members that can be accessed with a reflective call: val subInlet: this.SubSinkInlet[U],val subOutlet: this.SubSourceOutlet[T]
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.SetupFlowStage.createStageLogic
[error] private def createStageLogic(matPromise: Promise[M]) = new GraphStageLogic(shape) {
[error] ^
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala:91:15: method createStageLogic has an inferred structural type: org.apache.pekko.stream.stage.GraphStageLogic{val subInlet: this.SubSinkInlet[T]}
[error] members that can be accessed with a reflective call: val subInlet: this.SubSinkInlet[T]
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.SetupSourceStage.createStageLogic
[error] private def createStageLogic(matPromise: Promise[M]) = new GraphStageLogic(shape) {
[error] ^
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:258:16: method createLogicAndMaterializedValue has an inferred structural type: (org.apache.pekko.stream.stage.GraphStageLogic with org.apache.pekko.stream.stage.InHandler{val buf: scala.collection.mutable.Builder[T,That with scala.collection.immutable.Iterable[_]]}, scala.concurrent.Future[That])
[error] members that can be accessed with a reflective call: val buf: scala.collection.mutable.Builder[T,That with scala.collection.immutable.Iterable[_]]
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.SeqStage.createLogicAndMaterializedValue
[error] override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
[error] ^
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:315:16: method createLogicAndMaterializedValue has an inferred structural type: (org.apache.pekko.stream.stage.GraphStageLogic with org.apache.pekko.stream.stage.InHandler with org.apache.pekko.stream.scaladsl.SinkQueueWithCancel[T]{val maxBuffer: Int; val buffer: org.apache.pekko.stream.impl.Buffer[scala.util.Try[Option[T]]]; val currentRequests: org.apache.pekko.stream.impl.Buffer[scala.concurrent.Promise[Option[T]]]; def sendDownstream(promise: scala.concurrent.Promise[Option[T]]): Unit}, org.apache.pekko.stream.stage.GraphStageLogic with org.apache.pekko.stream.stage.InHandler with org.apache.pekko.stream.scaladsl.SinkQueueWithCancel[T]{val maxBuffer: Int; val buffer: org.apache.pekko.stream.impl.Buffer[scala.util.Try[Option[T]]]; val currentRequests: org.apache.pekko.stream.impl.Buffer[scala.concurrent.Promise[Option[T]]]; def sendDownstream(promise: scala.concurrent.Promise[Option[T]]): Unit})
[error] members that can be accessed with a reflective call: val maxBuffer: Int,val buffer: org.apache.pekko.stream.impl.Buffer[scala.util.Try[Option[T]]],val currentRequests: org.apache.pekko.stream.impl.Buffer[scala.concurrent.Promise[Option[T]]],def sendDownstream(promise: scala.concurrent.Promise[Option[T]]): Unit
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.QueueSink.createLogicAndMaterializedValue
[error] override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
[error] ^
[error] /Users/pj.fanning/code/pekko/stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:67:16: method createLogicAndMaterializedValue has an inferred structural type: (org.apache.pekko.stream.stage.TimerGraphStageLogic with org.apache.pekko.stream.stage.StageLogging{implicit def self: org.apache.pekko.actor.ActorRef; val connectionFlowsAwaitingInitialization: java.util.concurrent.atomic.AtomicLong; def listener: org.apache.pekko.actor.ActorRef; def listener_=(x$1: org.apache.pekko.actor.ActorRef): Unit; val unbindPromise: scala.concurrent.Promise[Unit]; def unbindStarted: Boolean; def unbindStarted_=(x$1: Boolean): Unit}, scala.concurrent.Future[org.apache.pekko.stream.scaladsl.Tcp.ServerBinding])
[error] members that can be accessed with a reflective call: implicit def self: org.apache.pekko.actor.ActorRef,val connectionFlowsAwaitingInitialization: java.util.concurrent.atomic.AtomicLong,def listener: org.apache.pekko.actor.ActorRef,def listener_=(x$1: org.apache.pekko.actor.ActorRef): Unit,val unbindPromise: scala.concurrent.Promise[Unit],def unbindStarted: Boolean,def unbindStarted_=(x$1: Boolean): Unit
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.stream.impl.io.ConnectionSourceStage.createLogicAndMaterializedValue
[error] override def createLogicAndMaterializedValue(inheritedAttributes: Attributes, eagerMaterialzer: Materializer) = {
[error] ^
[error] 6 errors found
[info] compiling 1 Scala source to /Users/pj.fanning/code/pekko/slf4j/target/scala-2.13/classes ...
[info] compiling 26 Scala sources and 3 Java sources to /Users/pj.fanning/code/pekko/testkit/target/scala-2.13/test-classes ...
[error] /Users/pj.fanning/code/pekko/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKit.scala:193:7: value GcMetricsFilter has an inferred structural type: com.codahale.metrics.MetricFilter{val keyPattern: java.util.regex.Pattern}
[error] members that can be accessed with a reflective call: val keyPattern: java.util.regex.Pattern
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-structural-type, site=org.apache.pekko.testkit.metrics.MetricsKit.GcMetricsFilter
[error] val GcMetricsFilter = new MetricFilter {
[error] ^
[error] one error found
[info] compiling 88 Scala sources to /Users/pj.fanning/code/pekko/actor-typed/target/scala-2.13/classes ...
[error] (stream / Compile / compileIncremental) Compilation failed
[error] (testkit / Test / compileIncremental) Compilation failed
We also have big trouble with scalatest - lots of these issues with our test code (one example)
[error] /Users/pj.fanning/code/pekko/testkit/src/test/scala/org/apache/pekko/testkit/AbstractSpec.scala:21:16: Usages of value an will be easy to mistake for calls to def an[T](implicit evidence$6: scala.reflect.ClassTag[T]): org.scalatest.matchers.dsl.ResultOfAnTypeInvocation[T], which has a single implicit parameter list.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-overload, site=org.apache.pekko.testkit.AbstractSpec
[error] abstract class AbstractSpec extends AnyWordSpecLike with Matchers with BeforeAndAfterEach
Metadata
Metadata
Assignees
Labels
No labels