https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
a

Akio Yasui

03/08/2023, 12:51 PM
Hello there! I am wondering if wire-compiler has any plan to support adding prefixes to the generated Kotlin classes. Since Kotlin/Native does not support framework modularization for Swift/ObjC, wire-generated Kotlin classes can cause name collision with my own classes. When the protobuf schema defines a
User
message, I cannot define another
User
class in my own module without the K/N compiler suffixing an underscore to either of them (
User_
) in the generated ObjC framework. I even have a number protobuf schemas for different endpoints, that leads to multiple underscores (
User___
) in the suffix when they share a same name. That’s why I want to make the naming persistent by specifying a custom prefix for each wire-compiler invocation, or letting it decide one from package names or something.
5 Views