marcoferrer / kroto-plus

gRPC Kotlin Coroutines, Protobuf DSL, Scripting for Protoc
Apache License 2.0
493 stars 28 forks source link

Support kotlin @DslMarker annotation for proto builders #7

Closed marcoferrer closed 6 years ago

marcoferrer commented 6 years ago

Since the generator for proto builders is essentially creating a dsl for the proto messages, it would benefit from the safety provided by the @DslMarker annotation.

In order to support this we'll have to use the protobuf insertion points to tag the builder interfaces with this required annotation.

This feature will have to be disabled by default. Users will then need to opt in explicitly since it requires the plugin output path to be the same as the java sources. Ive successfully tested a working prototype and just need to get the code generation wrapped up.