You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CastGenerator.generateCast method calls outType.toString() line 106, If CppType has null namespaces - toString() method returns 'null::TypeName'
The text was updated successfully, but these errors were encountered:
nikomoravec
changed the title
If proto file doesn't have 'package' field (thats correct case) - CastGenerateor will generate code that have no chances to compile
If proto file doesn't have 'package' field (that is correct case) - CastGenerateor will generate code that have no chances to compile
Jul 30, 2018
This issue comes from ProtoProcessor initialization, line 106 this.packageNamespace = new CppNamespace(parse.packageName());
If package is empty - packageNamespace will be null
Cornerstone have strong dependency on package name. This field are private and locates in third party library called 'squareup.wire.schema'. I think we should not use tricks like reflection or unsafe for set this field to ProtoFileElement and just make package field necessarily
Why, no, I think it’s really not that important to preserve an existing ProtoFileElement if we instead could just costruct a new one using fancy builder, replacing package name with the synthesized one or no one at all. I think this particular thing requires a bit more precise investigation. Nevertheless, I merged your changes to the master, because we don’t have a better solution now. Wish you all the best, thank you for contributing into free software.
CastGenerator.generateCast
method callsoutType.toString()
line 106, If CppType has null namespaces - toString() method returns 'null::TypeName'The text was updated successfully, but these errors were encountered: