diff --git a/recorder/src/main/kotlin/com/engine/protoc/util/recorder/Main.kt b/recorder/src/main/kotlin/com/engine/protoc/util/recorder/Main.kt index d0d6f38..4c6cc19 100644 --- a/recorder/src/main/kotlin/com/engine/protoc/util/recorder/Main.kt +++ b/recorder/src/main/kotlin/com/engine/protoc/util/recorder/Main.kt @@ -7,6 +7,17 @@ public fun main() { PluginProtos .CodeGeneratorResponse .newBuilder() + /* protoc fails compilation if a plugin does not support all features in the current fileset. + * since this plugin's job is to pass _all_ information directly to disk, we should always support all features. + * note: this does not use "options" to control which features to support for 2 reasons: + * 1. using an option would require this plugin to parse the input + * 2. we want customers of the plugin to be able to set their options to be passed to their plugins, and using our own options interferes with that goal. + */ + .setSupportedFeatures( + PluginProtos.CodeGeneratorResponse.Feature.entries.fold(0L) { acc, feature -> + acc.or(feature.number.toLong()) + }, + ) .addFile( PluginProtos.CodeGeneratorResponse.File.newBuilder().apply { name = "code-generator-request.binpb"