Update package mapping to include wildcards protoc task - #240
Conversation
| it.resolve("bin/protoc-gen-pbandk" + ".bat".takeIf { OperatingSystem.current().isWindows }.orEmpty()) | ||
| })) | ||
| pluginOptions.add(kotlinPackage.map { "kotlin_package" to it }) | ||
| pluginOptions.add(kotlinPackageMapping.map { "kotlin_package_mapping" to it }) |
There was a problem hiding this comment.
I have a guess about why it's failing (I haven't tested this yet): I suspect that when kotlinPackageMapping is empty, this code will still add a null value to the pluginOptions list. When ProtocTask then runs protoc, it ends up passing a bogus value on the command line for the protoc-gen-pbandk plugin options.
This bug has always been here, even with the kotlinPackage line above this one. But it was never noticed because even though kotlinPackage is @Optional, every existing use of KotlinProtocTask provides a value for kotlinPackage.
There was a problem hiding this comment.
It can be dumb but how about providing an empty string as the default value? I think it should convert to an empty list behind the curtains.
There was a problem hiding this comment.
@garyp we are releasing 0.14.2 without this protoc task, would that be OK? What should we do for new proto options?
2423750 to
f1fd6f4
Compare
f1fd6f4 to
ffb90ea
Compare
No description provided.