Skip to content
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

Jetifier outputs are not deterministic #544

Closed
Bencodes opened this issue Apr 1, 2021 · 1 comment
Closed

Jetifier outputs are not deterministic #544

Bencodes opened this issue Apr 1, 2021 · 1 comment
Assignees

Comments

@Bencodes
Copy link
Contributor

Bencodes commented Apr 1, 2021

We are finding that the version of Jetifier being used by rules_jvm_external does not produce deterministic outputs. When comparing the execution binary files for two builds we see the following:

Both builds are fetching the same artifact with the same hash:

listed_outputs: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/roundedimageview-2.3.0.aar"
remotable: true
cacheable: true
progress_message: "Executing genrule @maven//:com_makeramen_roundedimageview_2_3_0_extension"
mnemonic: "Genrule"
actual_outputs {
  path: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/roundedimageview-2.3.0.aar"
  digest {
    hash: "43156c0b863a99ee22abd6c5cf67aa7b6de4dd65a63adc89d69f3eff3737afd2"
    size_bytes: 20929
    hash_function_name: "SHA-256"
  }
}

First build:

listed_outputs: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/jetified_roundedimageview-2.3.0.aar"
remotable: true
cacheable: true
progress_message: "Jetifying @maven//:com_makeramen_roundedimageview_2_3_0_extension"
mnemonic: "Jetify"
actual_outputs {
  path: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/jetified_roundedimageview-2.3.0.aar"
  digest {
    hash: "2103c16ba390bf0af51c9e5fad8a388334469c6ee489718625190e3fa1049c36"
    size_bytes: 20569
    hash_function_name: "SHA-256"
  }
}

Second build:

listed_outputs: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/jetified_roundedimageview-2.3.0.aar"
remotable: true
cacheable: true
progress_message: "Jetifying @maven//:com_makeramen_roundedimageview_2_3_0_extension"
mnemonic: "Jetify"
actual_outputs {
  path: "bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/v1/.../com/makeramen/roundedimageview/2.3.0/jetified_roundedimageview-2.3.0.aar"
  digest {
    hash: "0fdbc947394ab417391755aae0119e5ed5ba227931e1c9496e9356fbad023be2"
    size_bytes: 20569
    hash_function_name: "SHA-256"
  }
}
@Bencodes
Copy link
Contributor Author

Bencodes commented Apr 1, 2021

It looks like Jetifier 1.0.0-beta10 already has support for --timestampsPolicy but a standalone release hasn't been pushed to https://developer.android.com/studio/command-line/jetifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants