Skip to content

Commit

Permalink
Remove spurious usages of @nowarn
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanobaghino-da committed Jan 24, 2022
1 parent 58f6da8 commit b0ff6d5
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ import shapeless.record.{Record => HRecord}
import shapeless.syntax.singleton._
import shapeless.{Coproduct => HSum}

import scala.annotation.nowarn
import scala.language.implicitConversions

class HashSpec extends AnyWordSpec with Matchers {

@nowarn("msg=dead code following this construct")
private val packageId0 = Ref.PackageId.assertFromString("package")

private val complexRecordT =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import com.daml.error._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

import scala.annotation.nowarn

@nowarn("msg=deprecated")
class ErrorCodeDocumentationGeneratorSpec extends AnyFlatSpec with Matchers {
private val className = ErrorCodeDocumentationGenerator.getClass.getSimpleName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import com.google.rpc.status.{Status => StatusProto}
import io.grpc.Status
import org.slf4j.LoggerFactory

import scala.annotation.nowarn
import scala.collection.{immutable, mutable}
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.{Future, Promise}
Expand Down Expand Up @@ -235,7 +234,6 @@ private[commands] class CommandTracker[Context](
}
}

@nowarn("msg=deprecated")
private def registerSubmission(submission: Ctx[Context, CommandSubmission]): Unit = {
val commands = submission.value.commands
val submissionId = commands.submissionId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ import org.scalatest.concurrent.ScalaFutures
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AsyncWordSpec

import scala.annotation.nowarn
import scala.concurrent.duration.DurationLong
import scala.concurrent.{Future, Promise}
import scala.util.{Failure, Success, Try}

@nowarn("msg=deprecated")
class CommandTrackerFlowTest
extends AsyncWordSpec
with Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import com.daml.platform.indexer.{IndexerConfig, IndexerStartupMode}
import io.grpc.ServerInterceptor
import scopt.OptionParser

import scala.annotation.{nowarn, unused}
import scala.annotation.unused
import scala.concurrent.duration.FiniteDuration

@nowarn("msg=parameter value config .* is never used") // possibly used in overrides
trait ConfigProvider[ExtraConfig] {
val defaultExtraConfig: ExtraConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ import org.scalatest.OptionValues
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec

import scala.annotation.nowarn
import scala.jdk.CollectionConverters._

@nowarn("msg=deprecated")
class TransactionCommitterSpec
extends AnyWordSpec
with Matchers
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ import com.daml.nameof.NameOf.qualifiedNameOfCurrentFunc
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

import scala.annotation.nowarn

final class NameOfSpec extends AnyFlatSpec with Matchers {

behavior of "NameOf"

@nowarn()
case class Ham() {
def ham(): String = qualifiedNameOfCurrentFunc
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import scalaz.{-\/, Functor, \/, \/-}

import java.time.Instant
import java.util.UUID
import scala.annotation.{nowarn, tailrec}
import scala.annotation.tailrec
import scala.concurrent.duration.{FiniteDuration, _}
import scala.concurrent.{ExecutionContext, Future}

Expand All @@ -77,7 +77,6 @@ final case class Trigger(
// Whether the trigger supports readAs claims (SDK 1.18 and newer) or not.
hasReadAs: Boolean,
) {
@nowarn("msg=parameter value label .* is never used") // Proxy only
private[trigger] final class withLoggingContext[P] private (
label: label[Trigger with P],
kvs: Seq[LoggingEntry],
Expand Down

0 comments on commit b0ff6d5

Please sign in to comment.