Skip to content

Commit

Permalink
rpc (fix): Use lazy val for generated RPCMethod to avoid xxxInternals…
Browse files Browse the repository at this point in the history
…$.<clinit> is too large error (#3155)
  • Loading branch information
xerial authored Aug 24, 2023
1 parent b6ab427 commit 7a43f51
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ object RPCClientGenerator extends HttpClientGenerator {
def rpcMethodDefs(svc: ClientServiceDef): String = {
svc.methods
.map { m =>
s"""val __m_${m.name} = RPCMethod("${m.path}", "${svc.interfaceName}", "${m.name}", Surface.of[${m.requestModelClassType}], Surface.of[${m.returnType.fullTypeName}])"""
s"""lazy val __m_${m.name} = RPCMethod("${m.path}", "${svc.interfaceName}", "${m.name}", Surface.of[${m.requestModelClassType}], Surface.of[${m.returnType.fullTypeName}])"""
}.mkString("\n")
}

Expand Down

0 comments on commit 7a43f51

Please sign in to comment.