Support more than 254 fields
tpianta opened this issue · 1 comments
tpianta commented
I have a proto MyClass with 300 fields. When ScalaPB generates its scala files, it fails to build due to the JVM limit on the number of method parameters. There's nothing about proto that has this same limitation, so it seems like ScalaPB should support more fields.
MyClass.scala:9: error: Platform restriction: a parameter list's length cannot exceed 254.
final case class MyClass(
If ScalaPB used a builder rather than a constructor with all the fields as parameters, I believe this would resolve the issue.
thesamet commented
Hi @tpianta ,
It is unlikely that this issue is going to get fixed in the near future as this represents a significant change with little evidence that it is needed in practice by users. The existence of a large message most likely indicates that the design of the messages in the protos needs to be re-considered.