From bfe04468f336bf4c1cbf43166906626f3a79c674 Mon Sep 17 00:00:00 2001 From: Bazaah Date: Fri, 27 Sep 2024 17:14:40 +0000 Subject: [PATCH] internal: ensure proto_compile copies files not links at least in bazel 7.2, this leads to dangling symlink issues, and the remote cache complains about absolute symlinks. --- internal/compile.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/compile.bzl b/internal/compile.bzl index 401a1667..dbcfdf30 100644 --- a/internal/compile.bzl +++ b/internal/compile.bzl @@ -394,7 +394,7 @@ def proto_compile(ctx, options, extra_protoc_args, extra_protoc_files): # Build copy command for directory outputs # Use cp {}/. rather than {}/* to allow for empty output directories from a plugin (e.g when # no service exists, so no files generated) - command_parts = ["mkdir -p {} && cp -r {} '{}'".format( + command_parts = ["mkdir -p {} && cp -L -r {} '{}'".format( # We need to be sure that the dirs exist, see: # https://github.com/bazelbuild/bazel/issues/6393 " ".join(["'" + d.path + "'" for d in premerge_dirs]),