ijuma commented on a change in pull request #7452: URL: https://github.com/apache/kafka/pull/7452#discussion_r516710457
########## File path: build.gradle ########## @@ -419,6 +419,22 @@ subprojects { "-Xlint:constant", "-Xlint:unused" ] + + // Inline more aggressively when compiling the `core` jar since it's not meant to be used as a library. + // More specifically, inline classes from the Scala library so that we can inline methods like `Option.exists` + // and avoid lambda allocations. This is only safe if the Scala library version is the same at compile time + // and runtime. We cannot guarantee this for libraries like kafka streams, so only inline classes from the + // Kafka project in that case. + List<String> inlineFrom + if (project.name.equals('core')) + inlineFrom = ["-opt-inline-from:scala.**", "-opt-inline-from:kafka.**", "-opt-inline-from:org.apache.kafka.**"] Review comment: Let's continue the discussion in #9548. Note the comment from @lrytz is regarding the claim that the `core` module should not be used as a library. This is the recommendation from the Kafka project though, so we can discuss in #9548 why users are depending on this module as a library. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org