Skip to content

Commit

Permalink
correct remaining warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bpholt committed Mar 14, 2024
1 parent 6c7dfca commit 157e030
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package com.dwolla.util.async.finagle

import cats.data._
import cats.data.*
import cats.effect.std.Env
import cats.effect.syntax.all._
import cats.effect.{Trace => _, tracing => _, _}
import cats.syntax.all._
import cats.tagless._
import cats.effect.syntax.all.*
import cats.effect.{Trace as _, tracing as _, *}
import cats.syntax.all.*
import cats.tagless.*
import com.dwolla.util.async.finagle.ThriftClient.initialAcquire
import com.dwolla.util.async.twitter._
import com.dwolla.util.async.twitter.*
import com.twitter.util.{Closable, Future}
import natchez.Trace

import scala.language.reflectiveCalls

/**
* Build a Finagle Thrift client using the given Thrift
* method-per-endpoint algebra and the given destination. Optionally,
Expand Down Expand Up @@ -40,6 +38,7 @@ object TracedThriftClient {
*/
def apply[Alg[_[_]] <: AnyRef {def asClosable: Closable}] = new PartiallyAppliedThriftClient[Alg]()

@annotation.nowarn("msg=dubious usage of method hashCode with unit value")
class PartiallyAppliedThriftClient[Alg[_[_]] <: AnyRef {def asClosable: Closable}] private[TracedThriftClient](val dummy: Unit = ()) extends AnyVal {
/**
* @param name the local service name to be set on the Zipkin tracer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package com.dwolla.util.async.finagle
import cats.Functor
import cats.effect.Sync
import cats.effect.std.Env
import cats.syntax.all._
import com.comcast.ip4s._
import cats.syntax.all.*
import com.comcast.ip4s.*
import com.dwolla.util.async.finagle.ZipkinTracer.alwaysSample
import com.twitter.finagle.stats.NullStatsReceiver
import com.twitter.finagle.tracing.Tracer
Expand Down Expand Up @@ -35,7 +35,7 @@ object ZipkinTracerConfig {
}
}

class ZipkinTracerConfig(val host: SocketAddress[_],
class ZipkinTracerConfig(val host: SocketAddress[?],
val initialSampleRate: Float,
val tlsEnabled: Boolean,
val localServiceName: String,
Expand All @@ -47,14 +47,14 @@ class ZipkinTracerConfig(val host: SocketAddress[_],
this(
SocketAddress(host"127.0.0.1", port"9411"),
alwaysSample,
false,
tlsEnabled = false,
localServiceName,
true,
compressionEnabled = true,
"zipkin",
"/api/v2/spans"
)

def withHost(update: SocketAddress[_]): ZipkinTracerConfig =
def withHost(update: SocketAddress[?]): ZipkinTracerConfig =
new ZipkinTracerConfig(update, initialSampleRate, tlsEnabled, localServiceName, compressionEnabled, hostHeader, path)

private[finagle] def build(): HttpZipkinTracer.Config =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package com.dwolla.util.async.finagle

import cats.data._
import cats.effect._
import cats.syntax.all._
import cats.tagless._
import com.dwolla.util.async.twitter._
import cats.data.*
import cats.effect.*
import cats.syntax.all.*
import cats.tagless.*
import com.dwolla.util.async.twitter.*
import com.twitter.finagle.Thrift
import com.twitter.util.{Closable, Future}

import scala.language.reflectiveCalls

object ThriftClient {
def apply[Alg[_[_]] <: AnyRef {def asClosable: Closable}] = new PartiallyAppliedThriftClient[Alg]()

@annotation.nowarn("msg=dubious usage of method hashCode with unit value")
class PartiallyAppliedThriftClient[Alg[_[_]] <: AnyRef {def asClosable: Closable}] private[ThriftClient] (val dummy: Unit = ()) extends AnyVal {
def apply[G[_] : Async](dest: String)
(implicit
Expand Down

0 comments on commit 157e030

Please sign in to comment.