mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 00:35:25 +03:00
2fde30d916
Make Scala targets deterministic by disabling writing milliseconds timestamps into the statsfile. Before (cache disabled) ``` $ n=1; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n $ n=2; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n $ diff -u execlog1.json execlog2.json --- execlog1.json 2021-11-25 09:53:45.638891575 +0100 +++ execlog2.json 2021-11-25 10:01:52.831225558 +0100 @@ -311392,7 +311392,7 @@ }, { "path": "bazel-out/k8-opt/bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile", "digest": { - "hash": "1c535baa94812c16d33b6b3dcf2dec8e12b77e3a28cd1280ca2c9678840c4de6", + "hash": "a7f6f1b168649c1c5346ff92c69f0095b68781690e4b3f33321d8f35af8b3d77", "sizeBytes": "16", "hashFunctionName": "SHA-256" } @@ -311705,7 +311705,7 @@ }, { "path": "bazel-out/k8-opt/bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile", "digest": { - "hash": "b3af662512a906ec56abfb222f43af189b88b00ae0449bd44c25b7e90689c4db", + "hash": "d6c6e2a36754efea4863593a838fbfb500a66e0150d3c3e2e2490ad65c22a2cd", "sizeBytes": "16", "hashFunctionName": "SHA-256" } @@ -312025,7 +312025,7 @@ }, { "path": "bazel-out/k8-opt/bin/libs-scala/adjustable-clock/adjustable-clock.statsfile", "digest": { - "hash": "4326088227e5ecf2c21e76ddb6d77c9692ef1689dd146f65ec1e75c235382251", + "hash": "8a6b23f3c64ce3ff171772808ca0064af52bc145a32d1b6398de124aeb813c97", "sizeBytes": "16", "hashFunctionName": "SHA-256" } $ diff -r output1 output2 diff -ur output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile --- output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile 2021-11-25 09:53:41.706824833 +0100 +++ output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile 2021-11-25 10:01:49.047160467 +0100 @@ -1 +1 @@ -build_time=2507 +build_time=2522 diff -ur output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile --- output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile 2021-11-25 09:53:39.110780774 +0100 +++ output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile 2021-11-25 10:01:46.427115402 +0100 @@ -1 +1 @@ -build_time=4162 +build_time=3946 diff -ur output1/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile output2/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile --- output1/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile 2021-11-25 09:53:45.282885532 +0100 +++ output2/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile 2021-11-25 10:01:52.511220053 +0100 @@ -1 +1 @@ -build_time=3158 +build_time=3100 ``` After (cache disabled) ``` $ n=3; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n $ n=4; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n $ diff -u execlog3.json execlog4.json $ diff -ur output3 output4 ``` See https://github.com/bazelbuild/rules_scala/pull/1298 changelog_begin changelog_end Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io> |
||
---|---|---|
.. | ||
client_server | ||
dev_env_tool | ||
java_testing | ||
packaging | ||
runfiles | ||
scala | ||
scalapb | ||
sh | ||
build_environment.bzl | ||
BUILD.bazel | ||
create_workspace.bzl | ||
damlc_legacy.bzl | ||
fat_cc_library.bzl | ||
ghc_dwarf.bzl | ||
grpc-bazel-apple.patch | ||
grpc-bazel-mingw.patch | ||
grpc-haskell-core-cpp-options.patch | ||
grpc-haskell-core-upgrade.patch | ||
haskell_proto3_suite_deriving_defaults.patch | ||
haskell-c2hs.patch | ||
haskell-ghc-8.10.7-bindist.patch | ||
haskell-ghcide-binary-q.patch | ||
haskell-hie-bios.patch | ||
haskell-js-dgtable.patch | ||
haskell-js-flot.patch | ||
haskell-js-jquery.patch | ||
haskell-lsp-test-no-reexport.patch | ||
haskell-opt.patch | ||
haskell-shake.patch | ||
haskell-windows-extra-libraries.patch | ||
haskell-zip.patch | ||
haskell.bzl | ||
hlint.bzl | ||
java.bzl | ||
javadoc_library.bzl | ||
lsp-types-normalisation.patch | ||
nixpkgs-disable-http2.patch | ||
oracle.bzl | ||
os_info.bzl | ||
pkg.bzl | ||
pom_file.bzl | ||
pom_template.xml | ||
proto.bzl | ||
remote_apis_no_services.patch | ||
rules_nodejs_bash.patch | ||
rules_nodejs_node_dependency.patch | ||
rules_nodejs_npm_cli_path.patch | ||
scala_version.bzl | ||
scala-escape-jvmflags.patch | ||
scala.bzl | ||
scalapb.bzl |