-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
Re-shade zinc to avoid classpath collisions with annotation processors. #5953
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# NB: This is an intentionally ancient guava to attempt to flush out classpath collisions | ||
# with the compiler. | ||
jar_library(name='ancient-guava', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the guava zinc uses is already shaded, why do we still need to worry about classpath collision for the testproject? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're attempting to cause an incompatible collision here, which might catch bugs (like the lack of shading) in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see that's what you mean by
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear to me why an ancient guava would flush out classpath problems. Is Zinc using an ancient version? |
||
jars=[ | ||
jar('com.google.guava', 'guava', '10.0') | ||
]) | ||
|
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 that mean that when compiling sources that depend on a different version of log4j, there could be collision or binary incompatibility?
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.
Yes. Unavoidable, as far as I can tell. I confirmed that zinc fails to run without this exception.
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.
I'm fine shipping this, but maybe worth sandboxing this internally first and see how much pain it might cause if any?
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.
@wisechengyi : This only affects annotation processors, of which we have relatively few. I've tested it with them.