Skip to content

Commit 24bf1f0

Browse files
authored
Update scalafix version (#490)
* Update scalafix version * Correct for new whitespace in generated output
1 parent 73dfdca commit 24bf1f0

File tree

3 files changed

+57
-21
lines changed

3 files changed

+57
-21
lines changed

build.sbt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ThisBuild / scalaVersion := "2.12.19"
1+
ThisBuild / scalaVersion := "2.12.20"
22
ThisBuild / organization := "io.higherkindness"
33
ThisBuild / githubOrganization := "47deg"
44

@@ -18,9 +18,9 @@ lazy val core = project
1818
"com.thesamet.scalapb" %% "compilerplugin" % "0.11.17",
1919
"com.thesamet.scalapb" %% "scalapb-validate-codegen" % "0.3.5",
2020
"org.scalameta" %% "scalameta" % "4.9.7",
21-
"ch.epfl.scala" %% "scalafix-core" % "0.12.1",
22-
"ch.epfl.scala" %% "scalafix-cli" % "0.12.1" cross CrossVersion.full,
23-
"ch.epfl.scala" % "scalafix-interfaces" % "0.12.1",
21+
"ch.epfl.scala" %% "scalafix-core" % "0.13.0",
22+
"ch.epfl.scala" %% "scalafix-cli" % "0.13.0" cross CrossVersion.full,
23+
"ch.epfl.scala" % "scalafix-interfaces" % "0.13.0",
2424
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
2525
"org.scalacheck" %% "scalacheck" % "1.18.0" % Test,
2626
"org.scalatestplus" %% "scalacheck-1-16" % "3.2.14.0" % Test,

plugin/src/sbt-test/sbt-mu-srcgen/avroWithSchema/expected/scala-2/MyService.scala.txt

+21-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ object MyService {
1818
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)))
1919
}
2020
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)
21-
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 {
21+
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[({
22+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
23+
})#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _root_.cats.effect.std.Dispatcher.parallel[F].evalMap {
2224
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)))
2325
}
24-
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)
26+
def bindContextService[F[_], Context](implicit CE: _root_.cats.effect.Async[F], serverContext: _root_.higherkindness.mu.rpc.internal.context.ServerContext[F, Context], algebra: MyService[({
27+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
28+
})#T]): _root_.cats.effect.Resource[F, _root_.io.grpc.ServerServiceDefinition] = _bindContextService[F, Context](_root_.higherkindness.mu.rpc.protocol.Identity)
2529
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] {
2630
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): Client[F] = new Client[F](channel, options)
2731
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)
@@ -33,15 +37,25 @@ object MyService {
3337
new Client[F](managedChannelInterpreter, options)
3438
}
3539
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)
36-
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] {
40+
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[({
41+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
42+
})#T] {
3743
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ContextClient[F, Context] = new ContextClient[F, Context](channel, options)
3844
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)
3945
}
40-
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)))
41-
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)))
42-
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] = {
46+
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[({
47+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
48+
})#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)))
49+
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[({
50+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
51+
})#T]] = _root_.cats.effect.Resource.make(channel)(channel => CE.void(CE.delay(channel.shutdown()))).evalMap(ch => CE.delay(new ContextClient[F, Context](ch, options)))
52+
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[({
53+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
54+
})#T] = {
4355
val managedChannelInterpreter = new _root_.higherkindness.mu.rpc.channel.ManagedChannelInterpreter[F](channelFor, channelConfigList).unsafeBuild(disp)
4456
new ContextClient[F, Context](managedChannelInterpreter, options)
4557
}
46-
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)
58+
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[({
59+
type T[α] = _root_.cats.data.Kleisli[F, Context, α]
60+
})#T] = new ContextClient[F, Context](channel, options)
4761
}

0 commit comments

Comments
 (0)