# Bug report for the gRPC plugin

**URL:** <https://community.gatling.io/t/bug-report-for-the-grpc-plugin/8690>\
**Category:** General discussions\
**Created:** [February 2, 2024, 8:38pm UTC](https://community.gatling.io/t/bug-report-for-the-grpc-plugin/8690 "2024-02-02T20:38:33Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![phiSgr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/phisgr/32/1437_2.png) [@phiSgr](https://community.gatling.io/u/phiSgr)\
**Post date:** [February 5, 2024, 5:42pm UTC](https://community.gatling.io/t/bug-report-for-the-grpc-plugin/8690/3 "2024-02-05T17:42:44Z")

</div>

> we will cover everything in the end

That’s great to hear. But some of the things I did in the community plugin was code heavy, I worry that they might be philosophically incompatible with the rest of Gatling.

* * *

Speaking of philosophy, what do you think about the use of lens+expression with ScalaPB generated messages?

Compare the following [Scala snippet](https://github.com/gatling/gatling-grpc-demo/blob/main/scala/sbt/src/test/scala/io/gatling/grpc/demo/GreetingSimulation.scala):

```scala
for {
  firstName <- session("firstName").validate[String]
  lastName <- session("lastName").validate[String]
} yield Greeting(firstName, lastName)

```

and the corresponding [Kotlin code](https://github.com/gatling/gatling-grpc-demo/blob/main/kotlin/gradle/src/gatling/kotlin/io/gatling/grpc/demo/CalculatorSimulation.kt):

```kt
greeting {
    firstName = session.get("firstName") ?: "null"
    lastName = session.get("lastName") ?: "null"
}

```

In the Scala version `firstName` appears 3 times (will be four if you use named arguments) - twice are intermediate variables; and the type `String` has to be provided explicitly. It doesn’t sit well with me that the Scala code is more verbose than the Kotlin version.

But I also know that the [lens magic](https://github.com/phiSgr/gatling-grpc/blob/a56d9de763165a0a073649ee8fb3dc8ef80001c7/src/test/scala/com/github/phisgr/example/GrpcExample.scala#L49) I did was confusing for many. I’d love to hear your thoughts on that.

---

_[View the full topic](https://community.gatling.io/t/bug-report-for-the-grpc-plugin/8690)._
