Hi Nadav,
Thanks for your reply.
I looked into both options and sadly, given that scalapb explicitly generates the toString function, 2 is not an option.
Option 1 is obviously possible, but it is very error prone as one cannot guarantee that someone won't just chuck the proto file into the log.debug without stripping the content one day. Being able to control toString would protect against this.
I understand that scalaPB has to be compatible with google ascii format. However, is it necessary for the toString method to return said text format?
Given the wide use of toString method for logging / debugging / etc should it be part of any explicit specification? Json libraries usually use toJson (or similar) rather than toString for a similar reason.
Wouldn't something like toProtoString, while keeping toString free for any use, make more sense?
Thanks,
Mike