-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add prefix to classpath of generated protobuf files #169
Add prefix to classpath of generated protobuf files #169
Conversation
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.
Looks great.
protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/PackageResolution.kt
Outdated
Show resolved
Hide resolved
...src/main/proto/com/toasttab/protokt/testing/options/custom_file_descriptor_object_name.proto
Outdated
Show resolved
Hide resolved
verify lite runtime in android projects
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.
Two tiny things and then this is ready to merge.
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.
Let's punt till 1.0.
- The cost of propagating this backwards-incompatible change through systems that use protokt is substantial.
- Current behavior is consistent with Wire and ScalaPB (other protobuf codegens that target JVM languages)
superseded by #168 |
Adds a protokt specific prefix to classpath of generated protobuf files to avoid conflicts in projects that use both protokt and another protobuf library, such as that of google. This will allow projects to safely use protokt and another protobuf library and not have conflicts (which can lead to RuntimeExceptions) between generated file paths.
Note: this is a breaking change and upgrading to this version of protokt will involve making changes to add the "protokt." to certain imports
Testing: Verified this fixes at least one runtime exception that was occurring with google protobuf and protokt libraries in the same service
Future changes:
In the future, we plan on potentially doing some more package cleanup to: