-
Notifications
You must be signed in to change notification settings - Fork 43
Update package mapping to include wildcards protoc task #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.