Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions recorder/src/main/kotlin/com/engine/protoc/util/recorder/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading