diff --git a/.bazelrc b/.bazelrc index 43f59a6..a9ac61b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -2,4 +2,5 @@ build \ --spawn_strategy=standalone \ --strategy=SwiftCompile=worker \ --incompatible_strict_action_env=1 \ - --build_event_binary_file=/tmp/bep.bep + --build_event_binary_file=/tmp/bep.bep \ + --experimental_worker_allow_json_protocol diff --git a/BUILD b/BUILD index 1121281..bc0a6cd 100644 --- a/BUILD +++ b/BUILD @@ -50,7 +50,7 @@ macos_application( name = "BSBuildService", bundle_id = "com.xcbuildkit.example", infoplists = ["Examples/BSBuildService/Info.plist"], - minimum_os_version = "10.14", + minimum_os_version = "10.15.4", version = ":XCBuildKitVersion", deps = [":BSBuildServiceLib"], ) @@ -69,7 +69,7 @@ macos_application( name = "HybridBuildService", bundle_id = "com.xcbuildkit.example", infoplists = ["Examples/HybridBuildService/Info.plist"], - minimum_os_version = "10.14", + minimum_os_version = "10.15.4", version = ":XCBuildKitVersion", deps = [":HybridBuildServiceLib"], ) @@ -100,7 +100,7 @@ macos_application( "Examples/BazelBuildService/Info.plist", ":BuildInfo", ], - minimum_os_version = "10.14", + minimum_os_version = "10.15.4", version = ":XCBuildKitVersion", deps = [":BazelBuildServiceLib"], ) diff --git a/BuildServiceShim/BUILD b/BuildServiceShim/BUILD index 8dd01a0..603dee9 100644 --- a/BuildServiceShim/BUILD +++ b/BuildServiceShim/BUILD @@ -5,8 +5,13 @@ cc_binary( srcs = ["main.c"], ) +sh_library( + name = "BuildServiceShim_deps", + data = ["stub.sh"], +) + sh_binary( name = "BuildServiceShim", srcs = [":main"], - data = glob(["*.sh"]), + deps = [":BuildServiceShim_deps"] ) diff --git a/BuildServiceShim/main.c b/BuildServiceShim/main.c index 5ae330b..d2bdc65 100644 --- a/BuildServiceShim/main.c +++ b/BuildServiceShim/main.c @@ -2,6 +2,6 @@ int main(int ac, char** av) { // Run a bash script "stub" adjacent to the binary - system("/bin/bash -c \"$(dirname $XCBBUILDSERVICE_PATH)/BuildServiceShim.runfiles/__main__/BuildServiceShim/stub.sh\""); + system("/bin/bash -c \"set -e; /Users/jmarino/Development/xcbuildkit/BuildServiceShim/stub.sh \""); return 0; } diff --git a/BuildServiceShim/stub.sh b/BuildServiceShim/stub.sh index 1f7bb8e..a379597 100755 --- a/BuildServiceShim/stub.sh +++ b/BuildServiceShim/stub.sh @@ -3,7 +3,8 @@ # The service is adjacent to this program # The layer of indirection is useful for debugging and not # a production component -SERVICE="$(dirname $(dirname $XCBBUILDSERVICE_PATH))/BazelBuildService_app_dir/BazelBuildService.app/Contents/MacOS/BazelBuildService" +# FIXME(https://github.com/jerrymarino/xcbuildkit/issues/36) +SERVICE="/private/var/tmp/_bazel_jmarino/2d5afbd2e45fa256f993768c937cd6e8/execroot/__main__/bazel-out/applebin_macos-darwin_x86_64-fastbuild-ST-73b41d209e9d/bin/BazelBuildService_archive-root/BazelBuildService.app/Contents/MacOS/BazelBuildService" function redirect() { #tee >($SERVICE) /tmp/xcbuild.out @@ -18,9 +19,14 @@ function replace() { tee /tmp/xcbuild.in | $SERVICE | tee /tmp/xcbuild.out } -# This simply redirects stdin and stdout of Xcode's build service -if [[ "${BUILD_SERVICE_REDIRECT:-false}" == "true" ]]; then - redirect -else - replace -fi +# FIXME(https://github.com/jerrymarino/xcbuildkit/issues/36) +# Forcing `replace` for the purposes of what is being tested here on indexing +replace +# redirect + +# # This simply redirects stdin and stdout of Xcode's build service +# if [[ "${BUILD_SERVICE_REDIRECT:-false}" == "true" ]]; then +# redirect +# else +# replace +# fi