Skip to content

Commit

Permalink
Update scalafix version (#490)
Browse files Browse the repository at this point in the history
* Update scalafix version

* Correct for new whitespace in generated output
  • Loading branch information
zarthross authored Oct 16, 2024
1 parent 73dfdca commit 24bf1f0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.19"
ThisBuild / scalaVersion := "2.12.20"
ThisBuild / organization := "io.higherkindness"
ThisBuild / githubOrganization := "47deg"

Expand All @@ -18,9 +18,9 @@ lazy val core = project
"com.thesamet.scalapb" %% "compilerplugin" % "0.11.17",
"com.thesamet.scalapb" %% "scalapb-validate-codegen" % "0.3.5",
"org.scalameta" %% "scalameta" % "4.9.7",
"ch.epfl.scala" %% "scalafix-core" % "0.12.1",
"ch.epfl.scala" %% "scalafix-cli" % "0.12.1" cross CrossVersion.full,
"ch.epfl.scala" % "scalafix-interfaces" % "0.12.1",
"ch.epfl.scala" %% "scalafix-core" % "0.13.0",
"ch.epfl.scala" %% "scalafix-cli" % "0.13.0" cross CrossVersion.full,
"ch.epfl.scala" % "scalafix-interfaces" % "0.13.0",
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.scalacheck" %% "scalacheck" % "1.18.0" % Test,
"org.scalatestplus" %% "scalacheck-1-16" % "3.2.14.0" % Test,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ object MyService {
disp => _root_.higherkindness.mu.rpc.internal.service.GRPCServiceDefBuilder.build[F]("io.higherkindness.MyService", (hiMethodDescriptor, _root_.higherkindness.mu.rpc.internal.server.handlers.unary[F, io.higherkindness.Foo, io.higherkindness.Person](algebra.hi, compressionType, disp)))
}
def bindService[F[_]](implicit CE: _root_.cats.effect.Async[F], algebra: MyService[F]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _bindService[F](_root_.higherkindness.mu.rpc.protocol.Identity)
def _bindContextService[F[_], Context](compressionType: _root_.higherkindness.mu.rpc.protocol.CompressionType)(implicit CE: _root_.cats.effect.Async[F], serverContext: _root_.higherkindness.mu.rpc.internal.context.ServerContext[F, Context], algebra: MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _root_.cats.effect.std.Dispatcher.parallel[F].evalMap {
def _bindContextService[F[_], Context](compressionType: _root_.higherkindness.mu.rpc.protocol.CompressionType)(implicit CE: _root_.cats.effect.Async[F], serverContext: _root_.higherkindness.mu.rpc.internal.context.ServerContext[F, Context], algebra: MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _root_.cats.effect.std.Dispatcher.parallel[F].evalMap {
disp => _root_.higherkindness.mu.rpc.internal.service.GRPCServiceDefBuilder.build[F]("io.higherkindness.MyService", (hiMethodDescriptor, _root_.higherkindness.mu.rpc.internal.server.handlers.contextUnary[F, Context, io.higherkindness.Foo, io.higherkindness.Person](algebra.hi, hiMethodDescriptor, compressionType, disp)))
}
def bindContextService[F[_], Context](implicit CE: _root_.cats.effect.Async[F], serverContext: _root_.higherkindness.mu.rpc.internal.context.ServerContext[F, Context], algebra: MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _bindContextService[F, Context](_root_.higherkindness.mu.rpc.protocol.Identity)
def bindContextService[F[_], Context](implicit CE: _root_.cats.effect.Async[F], serverContext: _root_.higherkindness.mu.rpc.internal.context.ServerContext[F, Context], algebra: MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _bindContextService[F, Context](_root_.higherkindness.mu.rpc.protocol.Identity)
class Client[F[_]](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F]) extends _root_.io.grpc.stub.AbstractStub[Client[F]](channel, options) with MyService[F] {
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): Client[F] = new Client[F](channel, options)
def hi(input: io.higherkindness.Foo): F[io.higherkindness.Person] = _root_.higherkindness.mu.rpc.internal.client.calls.unary[F, io.higherkindness.Foo, io.higherkindness.Person](input, hiMethodDescriptor, channel, options)
Expand All @@ -33,15 +37,25 @@ object MyService {
new Client[F](managedChannelInterpreter, options)
}
def unsafeClientFromChannel[F[_]](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F]): MyService[F] = new Client[F](channel, options)
class ContextClient[F[_], Context](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]) extends _root_.io.grpc.stub.AbstractStub[ContextClient[F, Context]](channel, options) with MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T] {
class ContextClient[F[_], Context](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]) extends _root_.io.grpc.stub.AbstractStub[ContextClient[F, Context]](channel, options) with MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T] {
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ContextClient[F, Context] = new ContextClient[F, Context](channel, options)
def hi(input: io.higherkindness.Foo): _root_.cats.data.Kleisli[F, Context, io.higherkindness.Person] = _root_.higherkindness.mu.rpc.internal.client.calls.contextUnary[F, Context, io.higherkindness.Foo, io.higherkindness.Person](input, hiMethodDescriptor, channel, options)
}
def contextClient[F[_], Context](channelFor: _root_.higherkindness.mu.rpc.ChannelFor, channelConfigList: List[_root_.higherkindness.mu.rpc.channel.ManagedChannelConfig] = List(_root_.higherkindness.mu.rpc.channel.UsePlaintext()), options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): _root_.cats.effect.Resource[F, MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T]] = _root_.cats.effect.Resource.make(new _root_.higherkindness.mu.rpc.channel.ManagedChannelInterpreter[F](channelFor, channelConfigList).build)(channel => CE.void(CE.delay(channel.shutdown()))).evalMap(ch => CE.delay(new ContextClient[F, Context](ch, options)))
def contextClientFromChannel[F[_], Context](channel: F[_root_.io.grpc.ManagedChannel], options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): _root_.cats.effect.Resource[F, MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T]] = _root_.cats.effect.Resource.make(channel)(channel => CE.void(CE.delay(channel.shutdown()))).evalMap(ch => CE.delay(new ContextClient[F, Context](ch, options)))
def unsafeContextClient[F[_], Context](channelFor: _root_.higherkindness.mu.rpc.ChannelFor, channelConfigList: List[_root_.higherkindness.mu.rpc.channel.ManagedChannelConfig] = List(_root_.higherkindness.mu.rpc.channel.UsePlaintext()), disp: _root_.cats.effect.std.Dispatcher[F], options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T] = {
def contextClient[F[_], Context](channelFor: _root_.higherkindness.mu.rpc.ChannelFor, channelConfigList: List[_root_.higherkindness.mu.rpc.channel.ManagedChannelConfig] = List(_root_.higherkindness.mu.rpc.channel.UsePlaintext()), options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): _root_.cats.effect.Resource[F, MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T]] = _root_.cats.effect.Resource.make(new _root_.higherkindness.mu.rpc.channel.ManagedChannelInterpreter[F](channelFor, channelConfigList).build)(channel => CE.void(CE.delay(channel.shutdown()))).evalMap(ch => CE.delay(new ContextClient[F, Context](ch, options)))
def contextClientFromChannel[F[_], Context](channel: F[_root_.io.grpc.ManagedChannel], options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): _root_.cats.effect.Resource[F, MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T]] = _root_.cats.effect.Resource.make(channel)(channel => CE.void(CE.delay(channel.shutdown()))).evalMap(ch => CE.delay(new ContextClient[F, Context](ch, options)))
def unsafeContextClient[F[_], Context](channelFor: _root_.higherkindness.mu.rpc.ChannelFor, channelConfigList: List[_root_.higherkindness.mu.rpc.channel.ManagedChannelConfig] = List(_root_.higherkindness.mu.rpc.channel.UsePlaintext()), disp: _root_.cats.effect.std.Dispatcher[F], options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T] = {
val managedChannelInterpreter = new _root_.higherkindness.mu.rpc.channel.ManagedChannelInterpreter[F](channelFor, channelConfigList).unsafeBuild(disp)
new ContextClient[F, Context](managedChannelInterpreter, options)
}
def unsafeContextClientFromChannel[F[_], Context](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): MyService[({ type T[α] = _root_.cats.data.Kleisli[F, Context, α] })#T] = new ContextClient[F, Context](channel, options)
def unsafeContextClientFromChannel[F[_], Context](channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT)(implicit CE: _root_.cats.effect.Async[F], clientContext: _root_.higherkindness.mu.rpc.internal.context.ClientContext[F, Context]): MyService[({
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
})#T] = new ContextClient[F, Context](channel, options)
}
Loading

0 comments on commit 24bf1f0

Please sign in to comment.