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

Building iOS resources causes bazel to cache a file for the null sha #6260

Closed
keith opened this issue Sep 26, 2018 · 21 comments
Closed

Building iOS resources causes bazel to cache a file for the null sha #6260

keith opened this issue Sep 26, 2018 · 21 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug

Comments

@keith
Copy link
Member

keith commented Sep 26, 2018

Currently if you build an iOS target that has resources (storyboards or asset catalogs in my testing) bazel will end up caching a file for the null sha e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. With remote caches this results in failed builds if you accept this file in your cache.

You can reproduce this with one of the sample projects in rules_apple:

bazel build //examples/ios/HelloWorld --disk_cache=cache
ls cache | grep e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Here you should see a match. If you remove all the resources portions of this BUILD file, this is no longer the case. After applying this diff:

diff --git i/examples/ios/HelloWorld/BUILD w/examples/ios/HelloWorld/BUILD
index 7f9385d..a3c4753 100644
--- i/examples/ios/HelloWorld/BUILD
+++ w/examples/ios/HelloWorld/BUILD
@@ -15,9 +15,6 @@ objc_library(
         "Sources/AppDelegate.m",
         "Sources/main.m",
     ],
-    resources = [
-        "Resources/Main.storyboard",
-    ],
 )
 
 apple_bundle_version(
@@ -27,14 +24,12 @@ apple_bundle_version(
 
 ios_application(
     name = "HelloWorld",
-    app_icons = ["//examples/resources:PhoneAppIcon.xcassets"],
     bundle_id = "com.example.hello-world",
     families = [
         "iphone",
         "ipad",
     ],
     infoplists = [":Info.plist"],
-    launch_storyboard = "//examples/resources:Launch.storyboard",
     minimum_os_version = "8.0",
     version = ":HelloWorldVersion",
     deps = [":Sources"],

And running:

rm -rf cache
bazel clean
bazel build //examples/ios/HelloWorld --disk_cache=cache
ls cache | grep e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

You should no longer see any matches. I see a few other references to e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 in other bazel issues, but none specifically talking about whether or not it is a problem. It seems like a few remote cache implementations work around this by not caching files that are empty (which seem to only happen for us when the key is also this sha). I can't find the exact rule that causes this with aquery, but I'd love to know if this is considered an issue, or if we should work around this in our remote cache.

What operating system are you running Bazel on?

macOS

What's the output of bazel info release?

0.17.1

I migrated this issue from here bazelbuild/rules_apple#228

@bayareabear
Copy link

We saw the same issue, and we work around with our remote cache to handle empty sha as well

@iirina iirina added z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple untriaged labels Sep 27, 2018
@tetromino
Copy link
Contributor

If you look in --experimental_execution_log_file output (after converting it using execlog parser), you will see lots of entries like:

inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}

This seems to be quite reasonable (tools may want to read from /dev/null under some conditions), so the question is, why would it cause breakage with remote caches for you?

Can you please expand on "with remote caches this results in failed builds if you accept this file in your cache" - what exactly you are doing, how it breaks, how you determined that null hash is at fault?

@keith
Copy link
Member Author

keith commented Sep 27, 2018

what exactly you are doing, how it breaks

When I try to bazel build using the cache after having built once and accepting this file on the cache side, the build actually fails.

how you determined that null hash is at fault?

Just based on the difference that if I stop saving keys for that sha from the cache, the builds no longer fail

@tetromino tetromino added team-Execution and removed z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple labels Sep 27, 2018
@tetromino
Copy link
Contributor

Which remote cache server, which version? Is there anything interesting in the logs when the failure happens?

(Assigning to team-Execution since this seems to be a general remote caching issue.)

@keith
Copy link
Member Author

keith commented Sep 27, 2018

It's a private implementation. Nothing interesting or different in the logs besides the change between a 404 or 200.

@buchgr
Copy link
Contributor

buchgr commented Oct 1, 2018

The empty file is supported as both input and output of remotely cached actions. Most builds I know of would generate an empty file at some point. Remote caching servers are expected to handle an empty file as any other file.

From this discussion I don't see the need to special case the empty file on the remote server and I also don't understand the build errors it's causing you. Can you elaborate please?

@buchgr buchgr removed the untriaged label Oct 1, 2018
@buchgr buchgr self-assigned this Oct 1, 2018
@buchgr buchgr added the P2 We'll consider working on this in future. (Assignee optional) label Oct 1, 2018
@keith
Copy link
Member Author

keith commented Oct 1, 2018

Ok so I can reproduce this with the example I provided above like this (with our remote cache running locally):

bazel build //examples/ios/HelloWorld --remote_http_cache=http://localhost:8080/bazel
bazel clean
bazel build //examples/ios/HelloWorld --remote_http_cache=http://localhost:8080/bazel

In this case I get this error from the iOS toolchain:

SUBCOMMAND: # //examples/ios/HelloWorld:HelloWorld [action 'StoryboardCompile examples/ios/HelloWorld/HelloWorld.resources/Launch.storyboardc']
(cd /private/var/tmp/_bazel_ksmiley/ce67f9c12271421120de449ea6206e4e/execroot/build_bazel_rules_apple && \
  exec env - \
    APPLE_SDK_PLATFORM=iPhoneSimulator \
    APPLE_SDK_VERSION_OVERRIDE=12.0 \
    XCODE_VERSION_OVERRIDE=10.0.0 \
  bazel-out/host/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner ibtool --compilation-directory '[ABSOLUTE]bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources' --minimum-deployment-target 8.0 --target-device iphone --target-device ipad --module HelloWorld '[ABSOLUTE]examples/resources/Launch.storyboard')
ERROR: /Users/ksmiley/dev/rules_apple/examples/ios/HelloWorld/BUILD:28:1: AssetCatalogCompile examples/ios/HelloWorld/HelloWorld.resources/actool-output failed (Exit 1)
/* com.apple.actool.errors */
/Users/ksmiley/dev/rules_apple/examples/resources/PhoneAppIcon.xcassets: error: The output directory "/private/var/tmp/_bazel_ksmiley/ce67f9c12271421120de449ea6206e4e/execroot/build_bazel_rules_apple/bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources/actool-output" does not exist.
Here's the entire execution log from the failed build (click to expand)
command_args: "external/local_config_cc/wrapped_clang"
command_args: "-arch"
command_args: "x86_64"
command_args: "-D_FORTIFY_SOURCE=1"
command_args: "-fstack-protector"
command_args: "-fcolor-diagnostics"
command_args: "-Wall"
command_args: "-Wthread-safety"
command_args: "-Wself-assign"
command_args: "-fno-omit-frame-pointer"
command_args: "-O0"
command_args: "-DDEBUG"
command_args: "-Wshorten-64-to-32"
command_args: "-Wbool-conversion"
command_args: "-Wconstant-conversion"
command_args: "-Wduplicate-method-match"
command_args: "-Wempty-body"
command_args: "-Wenum-conversion"
command_args: "-Wint-conversion"
command_args: "-Wunreachable-code"
command_args: "-Wmismatched-return-types"
command_args: "-Wundeclared-selector"
command_args: "-Wuninitialized"
command_args: "-Wunused-function"
command_args: "-Wunused-variable"
command_args: "-iquote"
command_args: "."
command_args: "-iquote"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/genfiles"
command_args: "-iquote"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin"
command_args: "-MD"
command_args: "-MF"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.d"
command_args: "-F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks"
command_args: "-F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks"
command_args: "-DOS_IOS"
command_args: "-fno-autolink"
command_args: "-isysroot"
command_args: "__BAZEL_XCODE_SDKROOT__"
command_args: "-fobjc-arc"
command_args: "-mios-simulator-version-min=8.0"
command_args: "-fexceptions"
command_args: "-fasm-blocks"
command_args: "-fobjc-abi-version=2"
command_args: "-fobjc-legacy-dispatch"
command_args: "-O0"
command_args: "-DDEBUG=1"
command_args: "-c"
command_args: "examples/ios/HelloWorld/Sources/main.m"
command_args: "-o"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.o"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "PATH"
  value: ".git/safe/../../.build/debug:/Users/ksmiley/.cargo/bin:/Users/ksmiley/.gem/bin:/Users/ksmiley/.pyenv/shims:/Users/ksmiley/.pyenv/bin:/Users/ksmiley/go/bin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin:/Users/ksmiley/dev/arcanist/bin:/Users/ksmiley/dev/lyft/k8stools:/Users/ksmiley/.bin:/Users/ksmiley/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "examples/ios/HelloWorld/Sources/AppDelegate.h"
  digest {
    hash: "efed221b27683d46343a6abc3d684e51101f900ebb7981e9b1df19f3aee6ff24"
    size_bytes: 757
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/ios/HelloWorld/Sources/main.m"
  digest {
    hash: "0187e8f0601eec52706c9b08b75f35ff2c575f7746a0487473d888cd541bd5b3"
    size_bytes: 876
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/cc_wrapper.sh"
  digest {
    hash: "6a24c920b4163c1447b62213784633f3dc00e824cb1b544c5aab12899bd751c4"
    size_bytes: 3257
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/libtool"
  digest {
    hash: "aff1be3f98e7d9e463a7080b19b8ad5065e36a6c0aadcf95f52c36e9b358f7ed"
    size_bytes: 3429
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/make_hashed_objlist.py"
  digest {
    hash: "3641a28bd6484191d78462f8032360ac217ecca6029cbb44e2aa626092b0b56f"
    size_bytes: 1773
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_ar"
  digest {
    hash: "fcc80f9cf2ebca620fe7798d8be9cab2c90103369ac057ba55174d79a837f2e6"
    size_bytes: 685
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang_pp"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/xcrunwrapper.sh"
  digest {
    hash: "11abc81e116d1534b341b10cd9bc9b7f9910b5737de70460775c1ee8dd12be51"
    size_bytes: 1549
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.d"
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.o"
remotable: true
cacheable: true
progress_message: "Compiling examples/ios/HelloWorld/Sources/main.m"
mnemonic: "ObjcCompile"
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.d"
  digest {
    hash: "65eb48c15a081984943fa469e72b6a15276ce6bfb7d874863fd7460ead552354"
    size_bytes: 135733
    hash_function_name: "SHA-256"
  }
}
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.o"
  digest {
    hash: "e7eec4b6257ab4ffc8351d77b24ee48bbbcf5508df8fd8a2e87c191f8af59dc7"
    size_bytes: 1492
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "external/local_config_cc/wrapped_clang"
command_args: "-arch"
command_args: "x86_64"
command_args: "-D_FORTIFY_SOURCE=1"
command_args: "-fstack-protector"
command_args: "-fcolor-diagnostics"
command_args: "-Wall"
command_args: "-Wthread-safety"
command_args: "-Wself-assign"
command_args: "-fno-omit-frame-pointer"
command_args: "-O0"
command_args: "-DDEBUG"
command_args: "-Wshorten-64-to-32"
command_args: "-Wbool-conversion"
command_args: "-Wconstant-conversion"
command_args: "-Wduplicate-method-match"
command_args: "-Wempty-body"
command_args: "-Wenum-conversion"
command_args: "-Wint-conversion"
command_args: "-Wunreachable-code"
command_args: "-Wmismatched-return-types"
command_args: "-Wundeclared-selector"
command_args: "-Wuninitialized"
command_args: "-Wunused-function"
command_args: "-Wunused-variable"
command_args: "-iquote"
command_args: "."
command_args: "-iquote"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/genfiles"
command_args: "-iquote"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin"
command_args: "-MD"
command_args: "-MF"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.d"
command_args: "-F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks"
command_args: "-F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks"
command_args: "-DOS_IOS"
command_args: "-fno-autolink"
command_args: "-isysroot"
command_args: "__BAZEL_XCODE_SDKROOT__"
command_args: "-fobjc-arc"
command_args: "-mios-simulator-version-min=8.0"
command_args: "-fexceptions"
command_args: "-fasm-blocks"
command_args: "-fobjc-abi-version=2"
command_args: "-fobjc-legacy-dispatch"
command_args: "-O0"
command_args: "-DDEBUG=1"
command_args: "-c"
command_args: "examples/ios/HelloWorld/Sources/AppDelegate.m"
command_args: "-o"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.o"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "PATH"
  value: ".git/safe/../../.build/debug:/Users/ksmiley/.cargo/bin:/Users/ksmiley/.gem/bin:/Users/ksmiley/.pyenv/shims:/Users/ksmiley/.pyenv/bin:/Users/ksmiley/go/bin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin:/Users/ksmiley/dev/arcanist/bin:/Users/ksmiley/dev/lyft/k8stools:/Users/ksmiley/.bin:/Users/ksmiley/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "examples/ios/HelloWorld/Sources/AppDelegate.h"
  digest {
    hash: "efed221b27683d46343a6abc3d684e51101f900ebb7981e9b1df19f3aee6ff24"
    size_bytes: 757
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/ios/HelloWorld/Sources/AppDelegate.m"
  digest {
    hash: "e6f1bd4487295dad582e1726258b83d84073213245b76531d15c529a490286da"
    size_bytes: 839
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/cc_wrapper.sh"
  digest {
    hash: "6a24c920b4163c1447b62213784633f3dc00e824cb1b544c5aab12899bd751c4"
    size_bytes: 3257
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/libtool"
  digest {
    hash: "aff1be3f98e7d9e463a7080b19b8ad5065e36a6c0aadcf95f52c36e9b358f7ed"
    size_bytes: 3429
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/make_hashed_objlist.py"
  digest {
    hash: "3641a28bd6484191d78462f8032360ac217ecca6029cbb44e2aa626092b0b56f"
    size_bytes: 1773
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_ar"
  digest {
    hash: "fcc80f9cf2ebca620fe7798d8be9cab2c90103369ac057ba55174d79a837f2e6"
    size_bytes: 685
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang_pp"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/xcrunwrapper.sh"
  digest {
    hash: "11abc81e116d1534b341b10cd9bc9b7f9910b5737de70460775c1ee8dd12be51"
    size_bytes: 1549
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.d"
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.o"
remotable: true
cacheable: true
progress_message: "Compiling examples/ios/HelloWorld/Sources/AppDelegate.m"
mnemonic: "ObjcCompile"
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.d"
  digest {
    hash: "6bbcc2871c457493bbd66fcddf497d9ac70f5239498debf1c377108e7ca2eccc"
    size_bytes: 135747
    hash_function_name: "SHA-256"
  }
}
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.o"
  digest {
    hash: "8870d215e9600cdd2621911a1259eee903963180d5f0f3334058acfadc2daf71"
    size_bytes: 13752
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "external/local_config_cc/libtool"
command_args: "-static"
command_args: "-filelist"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/Sources-archive.objlist"
command_args: "-arch_only"
command_args: "x86_64"
command_args: "-syslibroot"
command_args: "__BAZEL_XCODE_SDKROOT__"
command_args: "-o"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/libSources.a"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "PATH"
  value: ".git/safe/../../.build/debug:/Users/ksmiley/.cargo/bin:/Users/ksmiley/.gem/bin:/Users/ksmiley/.pyenv/shims:/Users/ksmiley/.pyenv/bin:/Users/ksmiley/go/bin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin:/Users/ksmiley/dev/arcanist/bin:/Users/ksmiley/dev/lyft/k8stools:/Users/ksmiley/.bin:/Users/ksmiley/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/Sources-archive.objlist"
  digest {
    hash: "1cb883566f295191204e5f9002249110463942a25955188d22d601e8447cc99d"
    size_bytes: 237
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/AppDelegate.o"
  digest {
    hash: "8870d215e9600cdd2621911a1259eee903963180d5f0f3334058acfadc2daf71"
    size_bytes: 13752
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/_objs/Sources/arc/main.o"
  digest {
    hash: "e7eec4b6257ab4ffc8351d77b24ee48bbbcf5508df8fd8a2e87c191f8af59dc7"
    size_bytes: 1492
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/cc_wrapper.sh"
  digest {
    hash: "6a24c920b4163c1447b62213784633f3dc00e824cb1b544c5aab12899bd751c4"
    size_bytes: 3257
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/libtool"
  digest {
    hash: "aff1be3f98e7d9e463a7080b19b8ad5065e36a6c0aadcf95f52c36e9b358f7ed"
    size_bytes: 3429
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/make_hashed_objlist.py"
  digest {
    hash: "3641a28bd6484191d78462f8032360ac217ecca6029cbb44e2aa626092b0b56f"
    size_bytes: 1773
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_ar"
  digest {
    hash: "fcc80f9cf2ebca620fe7798d8be9cab2c90103369ac057ba55174d79a837f2e6"
    size_bytes: 685
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang_pp"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/xcrunwrapper.sh"
  digest {
    hash: "11abc81e116d1534b341b10cd9bc9b7f9910b5737de70460775c1ee8dd12be51"
    size_bytes: 1549
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/libSources.a"
remotable: true
cacheable: true
progress_message: "Linking examples/ios/HelloWorld/libSources.a"
mnemonic: "CppLink"
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/libSources.a"
  digest {
    hash: "65f337691a3e6ea65e1081159d00ec3e0fb3db227a5273a926e4662af4aa3ed8"
    size_bytes: 15872
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/environment_plist/environment_plist"
command_args: "--platform"
command_args: "iphonesimulator12.0"
command_args: "--output"
command_args: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld_environment.plist"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/environment_plist/environment_plist"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/environment_plist/environment_plist"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/environment_plist/environment_plist.sh"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/environment_plist/environment_plist"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/environment_plist/environment_plist.sh"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/environment_plist/environment_plist.sh"
  digest {
    hash: "257e811f4282eb3cb829b0ff15e32876edfe22cdfb9a927a7b2638232ed1478e"
    size_bytes: 3152
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld_environment.plist"
remotable: true
cacheable: true
progress_message: "SkylarkAction examples/ios/HelloWorld/HelloWorld_environment.plist"
mnemonic: "SkylarkAction"
actual_outputs {
  path: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld_environment.plist"
  digest {
    hash: "566ae7aa0a14b10ec34f98a61de7dce5be88c608ca6650125cd9571dc63edf84"
    size_bytes: 243
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "external/local_config_cc/wrapped_clang"
command_args: "-arch"
command_args: "x86_64"
command_args: "-Xlinker"
command_args: "-objc_abi_version"
command_args: "-Xlinker"
command_args: "2"
command_args: "-Xlinker"
command_args: "-rpath"
command_args: "-Xlinker"
command_args: "@executable_path/Frameworks"
command_args: "-fobjc-link-runtime"
command_args: "-ObjC"
command_args: "-filelist"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.apple_binary-linker.objlist"
command_args: "-o"
command_args: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.apple_binary_bin"
command_args: "-Wl,-rpath"
command_args: "-Wl,@executable_path/../../Frameworks"
command_args: "-Wl,-S"
command_args: "-F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks"
command_args: "-F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks"
command_args: "-isysroot"
command_args: "__BAZEL_XCODE_SDKROOT__"
command_args: "-headerpad_max_install_names"
command_args: "-lc++"
command_args: "-no-canonical-prefixes"
command_args: "-target"
command_args: "x86_64-apple-ios"
command_args: "-mios-simulator-version-min=8.0"
command_args: "-framework"
command_args: "Foundation"
command_args: "-framework"
command_args: "UIKit"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "PATH"
  value: ".git/safe/../../.build/debug:/Users/ksmiley/.cargo/bin:/Users/ksmiley/.gem/bin:/Users/ksmiley/.pyenv/shims:/Users/ksmiley/.pyenv/bin:/Users/ksmiley/go/bin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin:/Users/ksmiley/dev/arcanist/bin:/Users/ksmiley/dev/lyft/k8stools:/Users/ksmiley/.bin:/Users/ksmiley/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.apple_binary-linker.objlist"
  digest {
    hash: "abf9539a4fbc30feb40e1f2c490b7cb71c7f08a839d47a3900295ad9b55520cb"
    size_bytes: 103
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/libSources.a"
  digest {
    hash: "65f337691a3e6ea65e1081159d00ec3e0fb3db227a5273a926e4662af4aa3ed8"
    size_bytes: 15872
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/cc_wrapper.sh"
  digest {
    hash: "6a24c920b4163c1447b62213784633f3dc00e824cb1b544c5aab12899bd751c4"
    size_bytes: 3257
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/libtool"
  digest {
    hash: "aff1be3f98e7d9e463a7080b19b8ad5065e36a6c0aadcf95f52c36e9b358f7ed"
    size_bytes: 3429
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/make_hashed_objlist.py"
  digest {
    hash: "3641a28bd6484191d78462f8032360ac217ecca6029cbb44e2aa626092b0b56f"
    size_bytes: 1773
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_ar"
  digest {
    hash: "fcc80f9cf2ebca620fe7798d8be9cab2c90103369ac057ba55174d79a837f2e6"
    size_bytes: 685
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/wrapped_clang_pp"
  digest {
    hash: "6c4bb79fc8bef6824df0ab4ba11aad8982332168e02d0176d82362d720a4cf53"
    size_bytes: 95056
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/local_config_cc/xcrunwrapper.sh"
  digest {
    hash: "11abc81e116d1534b341b10cd9bc9b7f9910b5737de70460775c1ee8dd12be51"
    size_bytes: 1549
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.apple_binary_bin"
remotable: true
cacheable: true
progress_message: "Linking examples/ios/HelloWorld/HelloWorld.apple_binary_bin"
mnemonic: "ObjcLink"
actual_outputs {
  path: "bazel-out/ios-x86_64-min8.0-applebin_ios-ios_x86_64-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.apple_binary_bin"
  digest {
    hash: "f24d42ef39ca694b92e6786c4dfc1333bf0bccc83998c7389faa744a4f3c484f"
    size_bytes: 42208
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/versiontool/versiontool"
command_args: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorldVersion.versiontool-control"
command_args: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorldVersion.bundle_version"
inputs {
  path: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorldVersion.versiontool-control"
  digest {
    hash: "71c465f47b993ade8c54a8d9bf2c3de0fdd3a38a512c97baa4c9de5fd2e3a131"
    size_bytes: 85
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/versiontool/versiontool"
  digest {
    hash: "d2b518e4cb04f4a69f1501b7260f1380201c309b1605c198c9f2a0496f4be1f3"
    size_bytes: 6802
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/versiontool/versiontool"
  digest {
    hash: "d2b518e4cb04f4a69f1501b7260f1380201c309b1605c198c9f2a0496f4be1f3"
    size_bytes: 6802
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/versiontool/versiontool.py"
  digest {
    hash: "1936ca933bdbd83c1e094eca8d46944dc2ee54fb226a647ba85a010c6b71a782"
    size_bytes: 9800
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/versiontool/versiontool"
  digest {
    hash: "d2b518e4cb04f4a69f1501b7260f1380201c309b1605c198c9f2a0496f4be1f3"
    size_bytes: 6802
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/versiontool/versiontool.py"
  digest {
    hash: "1936ca933bdbd83c1e094eca8d46944dc2ee54fb226a647ba85a010c6b71a782"
    size_bytes: 9800
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/versiontool/versiontool.py"
  digest {
    hash: "1936ca933bdbd83c1e094eca8d46944dc2ee54fb226a647ba85a010c6b71a782"
    size_bytes: 9800
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorldVersion.bundle_version"
remotable: true
cacheable: true
progress_message: "AppleBundleVersion examples/ios/HelloWorld/HelloWorldVersion.bundle_version"
mnemonic: "AppleBundleVersion"
actual_outputs {
  path: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorldVersion.bundle_version"
  digest {
    hash: "949e7f1dd0838cdcfc0399d3048ecc509e6a253bfc66dd69dc0fe2f7a4038d6a"
    size_bytes: 55
    hash_function_name: "SHA-256"
  }
}
runner: "remote cache hit"
remote_cache_hit: true


---------------------------------------------------------

command_args: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner"
command_args: "actool"
command_args: "--compile"
command_args: "[ABSOLUTE]bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources/actool-output"
command_args: "--platform"
command_args: "iphonesimulator"
command_args: "--output-partial-info-plist"
command_args: "[ABSOLUTE]bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources/actool-PartialInfo.plist"
command_args: "--minimum-deployment-target"
command_args: "8.0"
command_args: "--compress-pngs"
command_args: "--product-type"
command_args: "com.apple.product-type.application"
command_args: "--app-icon"
command_args: "PhoneAppIcon"
command_args: "--target-device"
command_args: "iphone"
command_args: "--target-device"
command_args: "ipad"
command_args: "[ABSOLUTE]examples/resources/PhoneAppIcon.xcassets"
environment_variables {
  name: "APPLE_SDK_PLATFORM"
  value: "iPhoneSimulator"
}
environment_variables {
  name: "APPLE_SDK_VERSION_OVERRIDE"
  value: "12.0"
}
environment_variables {
  name: "XCODE_VERSION_OVERRIDE"
  value: "10.0.0"
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner"
  digest {
    hash: "b8621f934f7b7dfeacdd3e37fc509d57d4cf97dc7380c32faac11e3e7ecec205"
    size_bytes: 6804
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/wrapper_common/execute.py"
  digest {
    hash: "1b8debd9349e32b62ee2a07e23d65dd199707cbefae289e349b86655e546efcf"
    size_bytes: 3159
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner"
  digest {
    hash: "b8621f934f7b7dfeacdd3e37fc509d57d4cf97dc7380c32faac11e3e7ecec205"
    size_bytes: 6804
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner.py"
  digest {
    hash: "ae977ef2ece1334ef84f3249a1f99d47621d8f70b0bf6c320b3fee3447a91b3f"
    size_bytes: 9346
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/wrapper_common/execute.py"
  digest {
    hash: "1b8debd9349e32b62ee2a07e23d65dd199707cbefae289e349b86655e546efcf"
    size_bytes: 3159
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "/dev/null"
  digest {
    hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "bazel-out/host/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner"
  digest {
    hash: "b8621f934f7b7dfeacdd3e37fc509d57d4cf97dc7380c32faac11e3e7ecec205"
    size_bytes: 6804
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner.py"
  digest {
    hash: "ae977ef2ece1334ef84f3249a1f99d47621d8f70b0bf6c320b3fee3447a91b3f"
    size_bytes: 9346
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/Contents.json"
  digest {
    hash: "ccc4ea46518df4a6a2622e01cf954110b00209a392bf6a04a5800f46651212f1"
    size_bytes: 2250
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-20.png"
  digest {
    hash: "cb26b8053574ff99ca89e412b03c47cacee8a248a7a143ccb12d6fc9ebe39c58"
    size_bytes: 533
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-20@2x.png"
  digest {
    hash: "7a70bfa618caab94e4ee36527a23b713ea0529594d1e2e2a4c60bfa5623584fc"
    size_bytes: 702
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-29.png"
  digest {
    hash: "b0f2c1186792fce2f0cee6ac57e170adec7362a991fa6828a0531d3d6b232f7e"
    size_bytes: 623
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-29@2x.png"
  digest {
    hash: "7fc9988deea0d7fb510cdaafba6419618d103752fbce26797714f19662173397"
    size_bytes: 904
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-29@3x.png"
  digest {
    hash: "a9bd42db0d390bf1a0928d0b5c5030ed72ceb25a9b8ffff16d7a5ffee2489f2e"
    size_bytes: 1140
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-40@2x.png"
  digest {
    hash: "e8eb6dd1d431f48aa1402563e77b6132da3d40c9fa50cc5f60830aebe65b7260"
    size_bytes: 1096
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-60.png"
  digest {
    hash: "867d1a0b7df9b482d9ab15b9c266115c0c30adfb9e382eb279abda7195fee6a6"
    size_bytes: 746
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-60@2x.png"
  digest {
    hash: "042254feb1cc0161c675e5363ef6ed270edac28b630780c273ff4e02c8ed2239"
    size_bytes: 1307
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-60@3x.png"
  digest {
    hash: "f5d14250cb74ceaafde3663cc8830678ee28d79a1f59c8c98dc9e64ca59e2fbb"
    size_bytes: 2245
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-76.png"
  digest {
    hash: "38c9e33a38690946a1c8ee004895cb59e52b1fe7d4bf9d0e3412c87521e7529a"
    size_bytes: 1106
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-76@2x.png"
  digest {
    hash: "3f0891be50e6daa2c680cf537ad68d506ce017f1b514bcc14fc4724de8fc7e38"
    size_bytes: 2063
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "examples/resources/PhoneAppIcon.xcassets/PhoneAppIcon.appiconset/PhoneAppIcon-83.5@2x.png"
  digest {
    hash: "cc61b3aa90ca21f95667bd23b9d9167f77377e647cd5f979588653f3d1a3ab48"
    size_bytes: 2335
    hash_function_name: "SHA-256"
  }
}
inputs {
  path: "external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner.py"
  digest {
    hash: "ae977ef2ece1334ef84f3249a1f99d47621d8f70b0bf6c320b3fee3447a91b3f"
    size_bytes: 9346
    hash_function_name: "SHA-256"
  }
}
listed_outputs: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources/actool-PartialInfo.plist"
listed_outputs: "bazel-out/darwin-fastbuild/bin/examples/ios/HelloWorld/HelloWorld.resources/actool-output"
remotable: true
cacheable: true
progress_message: "AssetCatalogCompile examples/ios/HelloWorld/HelloWorld.resources/actool-output"
mnemonic: "AssetCatalogCompile"
runner: "local"
status: "NON_ZERO_EXIT"
exit_code: 1


---------------------------------------------------------

@xinzhengzhang
Copy link

Is there any plan for fixing this issue?

@buchgr
Copy link
Contributor

buchgr commented Nov 16, 2018

Thanks for the awesome bug report @keith.

@xinzhengzhang I don't have the time to fix it right now. I would be happy to review a patch though!

@keith
Copy link
Member Author

keith commented Nov 26, 2018

@buchgr do you have an understanding of what the issue is? We're seeing this again (I believe) with another similar action. I'd be happy to attempt a patch but I'm not sure where to start

@keith
Copy link
Member Author

keith commented Nov 30, 2018

Spent some more time debugging this with the help of @sergiocampama. We've come to the conclusion that getting a null aha is expected and your remote cache implementation should handle it.

We also believe there's a bug in Bazel that in the case the remote cache doesn't return a response for this key, if the action was to create a directory, that doesn't happen. Where it should likely fall back to running locally and successfully create the directory.

@keith
Copy link
Member Author

keith commented Dec 4, 2018

Ok so the second case we found of this is still the same case. The problem seems to be that the rule has a directory defined in its outputs that bazel doesn't actually create. This directory is defined with declare_directory and it seems like bazel normally creates those (which I'm a bit surprised by), but when it gets a 404 (or other error) from the remote cache, it doesn't create the directory, and the commands being run in my example expect it to already exist

@buchgr
Copy link
Contributor

buchgr commented Dec 5, 2018

The expected behavior is that if there is a problem downloading output artifacts from the remote cache that bazel deletes all outputs that have been downloaded and executes the action locally. Is that not what you are seeing?

@keith
Copy link
Member Author

keith commented Dec 5, 2018

If I'm correct that Bazel is creating this directory which is my current understanding, then yes. Since that would mean to me that it should re-create it.

@buchgr
Copy link
Contributor

buchgr commented Dec 5, 2018

So what's the problem then? I fail to understand.

@sergiocampama
Copy link
Contributor

sergiocampama commented Dec 5, 2018

The documentation for declare_directory says that actions should create (i.e. mkdir) these output directories. But if you take a look at github.com/sergiocampama/tree-artifacts, you'll see that the documentation is incorrect, as that target builds correctly and the directories get created.

@buchgr can you confirm that tree artifact outputs, as created by ctx.actions.declare_directory, should be created by the rule author or by bazel? Is this an unintended consequence that bazel does it for the rule authors?

Now, as to what pertains to this issue, the problem that @keith is seeing is that when using remote cache, in some cases, bazel will fail to create this output tree artifact during an action execution. So, what we'd like to know is whether the fact that this output directory is missing in this circumstance is a bug with bazel & remote cache, or something that rule authors should be aware of and support in their rules.

@sergiocampama
Copy link
Contributor

cc @laurentlb

@buchgr
Copy link
Contributor

buchgr commented Dec 5, 2018

Bazel creates all declared output directories before executing an action. It's best to not rely on this behavior because it can cause trouble with remote execution. I am saying this fully realizing that many rules do rely on this behavior (which is fair) :). See also #6393.

The issue here probably is that Bazel creates the empty output directories, runs the action, gets a remote cache hit and when the download fails deletes the output directories. It then falls back to local execution which doesn't actually create the empty directory because it relies on Bazel to create it.

So that then seems to be a bug in the remote cache cleanup logic. We should only delete contents of output directories but not the directories themselves?

@sergiocampama
Copy link
Contributor

Perhaps? I'm not familiar with how remote cache is expected to work. Who would be the right person to assign this to?

@buchgr
Copy link
Contributor

buchgr commented Dec 5, 2018

Me :-). It should be simple enough to fix here: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java;l=268?q=AbstractRemoteActionCAche

@keith may I take you up on your offer to send a PR? :-)

@keith
Copy link
Member Author

keith commented Dec 5, 2018

Thanks for all the context here! I've submitted #6851 which I've verified locally fixes this issue.

luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Previously if a remote cache request failed, bazel would cleanup all
    directories that were marked as outputs for the action. These
    directories wouldn't end up being re-created by bazel, and could lead to
    failures if the actions didn't create the directories themselves. With
    this patch bazel deletes all output files, and the child directories of
    all output directories.

    Fixes bazelbuild/bazel#6260

    Closes #6851.

    PiperOrigin-RevId: 224781649
copybara-service bot pushed a commit that referenced this issue Jun 19, 2023
The directories that are to contain spawn outputs have already been created before the spawn executes, so it's unnecessary for RemoteExecutionService to create them (however, tests must be amended to establish that precondition).

The comment incorrectly suggests this is a fix for #6260. The actual fix was 4392ba4.

In addition, fix a bug whereby materializing an output directory as a symlink would fail because the directory already exists.

PiperOrigin-RevId: 541623490
Change-Id: I25abd3b7b5fc068a84f41c86b0050c110443218f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug
Projects
None yet
Development

No branches or pull requests

8 participants