Description
Description of the problem / feature request:
Originally reported by @mhlopko in bazel-contrib/rules_go#1669
rules_go has a rule called go_path
which can produce a directory tree in a couple of different modes. In copy
mode, the contents of the directory are expected to be regular files and subdirectories. They are written as regular files, but other rules that consume this output see them as symbolic links in the sandbox.
This can break tools like tar
if rule authors aren't careful to dereference symbolic links. This is new behavior in 0.17.1rc1, and I don't see any mention of it in the release notes, so I think it's a regression. If this is intended behavior going forward, I'll likely need to remove copy
mode from go_path
.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This gist defines a very simple rule that reproduces the problem and consumes the output of the rule in a test.
What operating system are you running Bazel on?
Linux, amd64
What's the output of bazel info release
?
0.17.1rc1
Any other information, logs, or outputs that you want to share?
@mhlopko pointed to #5721 as the point where this issue came up, but it happens for me locally without using a Docker image and doesn't seem related.
cc @philwo
Activity