-
Notifications
You must be signed in to change notification settings - Fork 537
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
Fix #2679: remove-exploration-java-proto-lite from the model library #2700
Fix #2679: remove-exploration-java-proto-lite from the model library #2700
Conversation
@fsharpasharp @rt4914 PTAL. |
It is unexpected to me that the app will build without step 3. Make sure that you are building the entire application. We'll have to wait for the checks to be fixed and rerun the checks. Everything else looks good. |
@@ -186,14 +186,14 @@ format_import_proto_library( | |||
java_lite_proto_library( | |||
name = "exploration_java_proto_lite", | |||
deps = [":exploration_proto"], | |||
visibility = ["//visibility:public"], |
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.
In general we should avoid doing this. Any reason why we want to make this public?
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.
@vinitamurthi, are you saying that we should be explicit about the visibility?
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.
Does #2699 (comment) help clarify the need @vinitamurthi or do you have a separate concern?
@fsharpasharp I am somehow getting this error now. Previously it worked fine but now this error is coming. I also followed the fix provided above but it also does not work. Please help me to fix this error. |
Replace ~ with your home directory. |
In your ~/.bazelrc file |
Similar to #2699 (comment) we need verify that all targets are now building with this change. Updating the branch to trigger a full run of all affected Bazel test targets. |
|
@BenHenning @vinitamurthi PTAL. |
I see that there is one failing check. Try to identify the issue and make sure that the all the tests pass locally as well. Let me know if you get stuck. Run
and
if the previous one passes. |
I asked @FareesHussain about this failed check and he said it just needs a re-run. I have attached the link of the comment. Also, when I ran the test you mentioned, it gets stuck at check number 11,978. Please, tell me how to proceed now. |
Okay, could you try to sync to head and run the checks again? It could help us rule out if it's a problem with the current commit or with the CI. |
Deferring to @fsharpasharp to figure out why we're seeing what appears to be Java proto lite libraries being generated for each proto (including transitive proto dependencies). Please reassign me once this PR is ready for review. |
Ah, didn't meant to close the PR. Checks are re-running now, sorry about that. Old checks can be seen in the commit above, but some might get cancelled by the automatic canceller. |
@fsharpasharp @BenHenning all the checks have passed. PTAL. Thanks. |
I'm going to spend some time to look into where the dependency is getting pulled from. I'll open some similar issues in the meantime, if you are itching to do some more work. Thanks for the patience, @yashraj-iitr. |
To be thorough we could remove
from the |
Ack, it seems like we can't solve this right now but moving in this direction is still satisfying Bazel's proto best practices. |
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.
Per my comment above, we'll just keep in mind that protos imply transitive dependencies as we modularize the codebase. We should take care to try and depend on the most specific proto possible for a given context.
Approved since this is solving the original issue. Thanks @yashraj-iitr!
Explanation
Fixes #2679 . Removed
:exploration_java_proto_lite
from the model library. Addedvisibility = ["//visibility:public"],
to thejava_lite_proto_library
that has the nameexploration_java_proto_lite
.The build was successful after Step 1 and Step 2. So, it was not required to follow Step 3.
Checklist