-
-
Notifications
You must be signed in to change notification settings - Fork 288
Check that jar output is byte-for-byte identical #55
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
Conversation
this seems to pass on linux, but it fails on my OSX machine. |
test this please |
Can one of the admins verify this patch? |
Here is the issue: jar seems to hardwire writing the current time. Not sure how linux escapes this. |
This passes on OSX. @ianoc @non this is what I came up with. This is minor edit of: to remove the unneeded guava dependency (so it would build easier). |
this closes #53 |
@smparkes @dinowernli review? This does not change the build time for an internal repo relative to sha: 7b891ad |
Nice. LGTM |
@@ -0,0 +1,5 @@ | |||
java_binary(name = "jar", |
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.
FWIW, @bazel_tools//tools/zip:zipper is a zip implementation that strip out timestamp. Might be easier to refer to it that to fork SingleJar's Jar implementation. (Also faster)
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.
That is good to know about instead of using system zip
, but what about making manifests? Seems nice to reuse that bit?
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.
Oh I see, then maybe you can use directly the SingleJar binary. Just ask if you need to get rid of the file fork and I can probably help you sort that out.
Sorry, out of town ;) LGTM |
This is to address #53
This adds a jar creator that is a minor edit of:
https://github.com/bazelbuild/bazel/blob/master/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper/JarCreator.java
to remove the unneeded guava dependency (so it would build easier), which sets the timestamps to fixed values, which makes the jars pure functions of the contents.