-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
reproduces redirecting java_protobuf_library through target() #121
Conversation
I fixed this by using a delegating java_protobuf_library() rule with an empty list of sources and specifying the build target I wanted to delegate in the dependencies [] argument. |
Glad you found a workaround, but that's a bug we should fix. However I'll wait until Patrick's change lands, because that shakes up so On Tue, May 13, 2014 at 11:35 AM, Eric Ayers notifications@github.comwrote:
|
Rebased this change after the big refactor and checked to see that it was still failing. |
There is a similar problem when you use 'dependencies()' to point to multiple jvm_bundle() targets. Running
|
5afda74
to
9bd572b
Compare
This issue seems to be fixed for dependencies of java_protobuf_library in commit 293b31e
|
9bd572b
to
b86be0e
Compare
It still doesn't work. It doesn't throw a stacktrace, but it doesn't generate code either (I was fooled because the generated code was already there). I updated the example again.
|
The bug here is in the calculation of dependees_by_gentarget(). It only looks at direct dependees of a gentarget, not considering there might be indirect references through target() (Dependencies target type). A workaround for this issue is to add --lang=java to the command line or in pants.ini
|
1 similar comment
Testing Done: Manually tested using the repro case in #121 I found that setting pants.ini to ``` [gen.protoc] lang: ["java"] ``` Enables us to compile in our repo in the latest version of pants. This allows us to get past problems that started cropping up with the UnionDependencies change to the classpath product introduced to help with classpath hygene. Bugs closed: 121, 1334 Reviewed at https://rbcommons.com/s/twitter/r/1994/
Fixed in commit 44a8f0e (https://rbcommons.com/s/twitter/r/2302/) by moving off of the CodeGen superclass. |
I had a case where I wanted to redirect to a java_protobuf_library() through a dependencies() target.
Should this work? This is a repro case I made in the protobuf code sample in pants.