-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Strip unnecessary Bazel server jar contents #22787
Conversation
1836a3d
to
4f17e4b
Compare
@meteorcloudy This PR touches third_party in a non-trivial way: It adds Maven dependencies that |
No worries, the third_party files touched in this PR are all imported, so we can just go through the normal import process. |
The complete list of imported files are:
|
a8a7d38
to
77f85ec
Compare
@meisterT This required some after the fact fixes to the JAR to make it deterministic. |
third_party/fastutil.proguard
Outdated
@@ -0,0 +1,8 @@ | |||
-dontobfuscate |
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.
@fmeum Unfortunately, our internal policy doesn't allow importing this file under bazel's own third_party to prevent potential bundling dependencies. I assume this is authored by you, right? Can you move this to the tools directory instead?
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.
Do you mean that I should move the file into tools
, but keep the genrule
referencing it in third_party
? Wouldn't that cause the file to show up under @bazel_tools//tools
?
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, as long as it's not included in
Line 43 in dd48c1a
name = "embedded_tools_srcs", |
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.
So maybe under tools/proguard
?
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 moved it into tools
and added it to exclude
so that excluding it is documented as an explicit choice.
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.
SG, thank you!
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.
To fix the CI breakage, you probably have to sync to HEAD.
fastutil is very large and thus stripped (but not obfuscated) with proguard. Also removes some third_party maven deps that are unused.
6686d69
to
f806402
Compare
fastutil is very large and thus stripped (but not obfuscated) with proguard. The Auto* processors do not need to be included into the release binary, only their annotations.
Also removes some third_party targets that are unused.
Bazel binary size on macOS is 65 MB before and 53 MB after this change.
Work towards #22722