From 4d9f1017960fc6d4026eccc0ceed375b275eb0ab Mon Sep 17 00:00:00 2001 From: Molly Tian Date: Thu, 12 Oct 2023 12:27:44 -0700 Subject: [PATCH] Add flags specific to mac os system to workaround missing support of paths with spaces for runfiles. More information about the issue can be found in https://github.com/bazelbuild/bazel/issues/4327. PiperOrigin-RevId: 572980749 --- .bazelrc | 6 ++++++ build_test_samples.sh | 2 +- samples/guava/.bazelrc | 6 ++++++ samples/helloworld/.bazelrc | 6 ++++++ samples/wasm/.bazelrc | 6 ++++++ .../wasm/src/test/java/com/google/j2cl/samples/wasm/BUILD | 4 ---- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index 5913e8360e..dc72c7394f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -12,6 +12,12 @@ build --strategy=JavaDeployJar=local build --strategy=JavaSourceJar=local build --strategy=Turbine=local +# --experimental_inprocess_symlink_creation is used to workaround the missing +# support for paths with spaces https://github.com/bazelbuild/bazel/issues/4327. +# Remove the two flags after this issue is fixed in bazel new release. +build --enable_platform_specific_config +build:macos --experimental_inprocess_symlink_creation + test --test_output=errors # Enable Java 11 diff --git a/build_test_samples.sh b/build_test_samples.sh index e2b43655ce..dad546d6b8 100755 --- a/build_test_samples.sh +++ b/build_test_samples.sh @@ -23,5 +23,5 @@ if [[ $1 == "CI" ]]; then (cd samples/guava && bazel build ...) # Build wasm Hello World sample in its own workspace - (cd samples/wasm && bazel build ...) + (cd samples/wasm && bazel test ...) fi diff --git a/samples/guava/.bazelrc b/samples/guava/.bazelrc index 5913e8360e..dc72c7394f 100644 --- a/samples/guava/.bazelrc +++ b/samples/guava/.bazelrc @@ -12,6 +12,12 @@ build --strategy=JavaDeployJar=local build --strategy=JavaSourceJar=local build --strategy=Turbine=local +# --experimental_inprocess_symlink_creation is used to workaround the missing +# support for paths with spaces https://github.com/bazelbuild/bazel/issues/4327. +# Remove the two flags after this issue is fixed in bazel new release. +build --enable_platform_specific_config +build:macos --experimental_inprocess_symlink_creation + test --test_output=errors # Enable Java 11 diff --git a/samples/helloworld/.bazelrc b/samples/helloworld/.bazelrc index 5913e8360e..dc72c7394f 100644 --- a/samples/helloworld/.bazelrc +++ b/samples/helloworld/.bazelrc @@ -12,6 +12,12 @@ build --strategy=JavaDeployJar=local build --strategy=JavaSourceJar=local build --strategy=Turbine=local +# --experimental_inprocess_symlink_creation is used to workaround the missing +# support for paths with spaces https://github.com/bazelbuild/bazel/issues/4327. +# Remove the two flags after this issue is fixed in bazel new release. +build --enable_platform_specific_config +build:macos --experimental_inprocess_symlink_creation + test --test_output=errors # Enable Java 11 diff --git a/samples/wasm/.bazelrc b/samples/wasm/.bazelrc index 5913e8360e..dc72c7394f 100644 --- a/samples/wasm/.bazelrc +++ b/samples/wasm/.bazelrc @@ -12,6 +12,12 @@ build --strategy=JavaDeployJar=local build --strategy=JavaSourceJar=local build --strategy=Turbine=local +# --experimental_inprocess_symlink_creation is used to workaround the missing +# support for paths with spaces https://github.com/bazelbuild/bazel/issues/4327. +# Remove the two flags after this issue is fixed in bazel new release. +build --enable_platform_specific_config +build:macos --experimental_inprocess_symlink_creation + test --test_output=errors # Enable Java 11 diff --git a/samples/wasm/src/test/java/com/google/j2cl/samples/wasm/BUILD b/samples/wasm/src/test/java/com/google/j2cl/samples/wasm/BUILD index 1fd0e16f4b..33a025e2da 100644 --- a/samples/wasm/src/test/java/com/google/j2cl/samples/wasm/BUILD +++ b/samples/wasm/src/test/java/com/google/j2cl/samples/wasm/BUILD @@ -8,10 +8,6 @@ package( j2wasm_test( name = "HelloWorldTest", srcs = glob(["*.java"]), - tags = [ - "local", - "manual", - ], deps = [ "@com_google_j2cl//:junit-j2wasm", "@com_google_j2cl//samples/wasm/src/main/java/com/google/j2cl/samples/wasm:helloworld",