cretz / pb-and-k

Kotlin Code Generator and Runtime for Protocol Buffers
MIT License
139 stars 15 forks source link

Fix path parsing for the kotlin_service_gen option #20

Closed garyp closed 4 years ago

garyp commented 5 years ago

File.pathSeparatorChar is : on Unix, but protoc already uses : to delimit the plugin options from the plugin output directory. So trying to include a list of paths for the kotlin_service_gen option fails because protoc splits on the first : character it sees in the --kotlin_out value.

Instead hardcode the path splitting for the kotlin_service_gen option to use ; (which also happens to be the value of File.pathSeparatorChar on Windows) on all platforms.