-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feature request: shade protobuf dependency #24
Comments
Is this before or after the 1.9 release (see #23) ? |
It was, yeah |
Does this mean it was before or after? |
After |
I looked into this a bit, and it feels like I don't have enough Maven experience to be able to fix this without reproducing the issue and without breaking something else. Do you have a concrete example change you think would work? @cpovirk Do you have any advice here? |
I've gotten myself a bit twisted around trying to understand this, but here's where I am, which is hopefully not wildly wrong: My mostly unhelpful starting point is that I don't think this is "morally" TestParameterInjector's fault: The problem is the libraries that are still on the old protobuf-lite. (Or the Real Problem is that the protobuf people renamed protobuf-lite to protobuf-javalite in the first place. But we're stuck with that problem. Being stuck with that, incidentally, was quite possibly one of the experiences that the authors of https://jlbp.dev/JLBP-6 were familiar with when they wrote about not ever doing that kind of thing....) Like I said, that's mostly unhelpful. But given that you're reporting other dependencies that are causing the same problem, I'd nudge you toward figuring out where the old protobuf-lite is coming from and trying to get those libraries to upgrade. But I seem to recall that protobuf at least used to require a close match between the runtime and the compiled code, so maybe that will go poorly? Or maybe it's gotten better, or maybe it was always OK as long as the runtime was the newer of the two? But it sounds like we're talking here about excluding the newer runtime, so I guess not? (Digression(?): I just tried doing the upgrade for Truth. I got stuck because xolstice/protobuf-maven-plugin#70 isn't in a release yet.... But that affects only our tests, so if by chance Truth is part of the problem, let me know, and we'll live without those tests or otherwise hack around it for now. [edit: Oh, Truth is probably not part of the problem, since its lite dependency is declared My next can-you-"just...?" suggestion is whether you've looked into excluding the protobuf-javalite dep from TestParameterInjector or explicitly declaring protobuf-lite deps in whichever projects are currently seeing protobuf-javalite "win" over it. [edit: Hopefully I didn't get that backward?] It does seem like it would be possible for TestParameterInjector to declare its protobuf dependency as Given that TestParameterInjector does need to create instance of |
This is a first step towards fixing #24
…terAnnotationMethodProcessor This is the second step towards fixing #24 The next and last step is to do the same for ParameterValueParsing, after which protobuf-javalite can be removed from the dependencies
…teString class. This is part of #24
We've had some issues with conflicting protobuf dependencies (javalite vs protobuf-lite) due to this dependency and others. Would you be open to shading the protobuf dependency instead?
The text was updated successfully, but these errors were encountered: