-
Notifications
You must be signed in to change notification settings - Fork 37
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
Kotlin package name conflicting #230
Comments
Something like this: |
There is an undocumented
Would that satisfy your use case? If not, your PR to add a prefix seems like a reasonable approach too. I just don't want to add another option if the existing option will work for you. The implementation is here if you're curious:
|
There are hundreds of different packages because we use monorepo structure for our protos. So there are 20-30 different microservices, each having a different package name, and they are divided into multiple sub-packages. From reading the code, what I understand is package mapping does not work for prefixes, e.g. I have
And I can't use
If I was able to use the latter, (which is similar to prefixing), I would be satisfied but maintaining the first solution is very tough in our case. Maybe we can extend it to support some wildcard matching, what do you think? Example (Dots might cause some issues but I think if we only parse regex inside parentheses, we will be safe)
|
Something like this would help a lot. I tried to keep syntax and implementation simple. |
1. Release `kotlin_package_mapping` option and document it. 2. Update package mapping logic to include wildcards. Fixes #230
When using the Gradle plugin, I need to add a prefix to my package name (or change it) because it overlaps with
kotlin {}
builtin and without it, I can't usegrpckt
.when I try
option("kotlin_package=pbandk.example")
it gives the error,seems like
kotlin_package
just overrides the proto package. But I want to add a suffix to porto package so it is something different from the defaultprotoc
generated packages. Otherwise imports are mixing up, grpc code tries to import frompbandk
so it gives errors.Is it possible to support something like package prefix?
The text was updated successfully, but these errors were encountered: