bazelbuild / bazelbuild/bazel

Disk cache possibly turns symlinks in output directories into files

Open
#25,671 10 comments 0 reactions 1 assignee Claimed by @tjgq View on GitHub
P2 team-Performance type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

I am seeing inconsistent behavior between local builds (without disk cache) and CI builds (with disk cache). I have a `rules_foreign_cc` rule that builds a project that results in some symlinks (e.g. `libfoo.so -> libfoo.so.1`). On initial builds, my outputs correctly have symlinks, but on subsequent builds with cache hits, I get regular files instead.

### Which category does this issue belong to?

Core

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

https://github.com/bazelbuild/bazel/issues/25671#issuecomment-2745395699

### Which operating system are you running Bazel on?

macOS, Linux

### What is the output of `bazel info release`?

release 7.3.1

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text
git@github.com:CACI-International/cpp-toolchain.git
e0774b98c30f926bf7b02cf01c0d78e5ee2a5f0c
```

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

_No response_

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.