dangling symbolic link with `--experimental_fetch_all_coverage_outputs`
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
I am trying to retain the `.gcov` files from running coverage and am using `--experimental_fetch_all_coverage_outputs` mentioned [here](https://github.com/bazelbuild/bazel/issues/20041#issuecomment-1805195618). When I run the coverage command, I get an error
```
Sep 23, 2024 5:49:19 PM com.google.devtools.coverageoutputgenerator.Main getTracefiles
INFO: No lcov file found.
Sep 23, 2024 5:49:19 PM com.google.devtools.coverageoutputgenerator.Main getGcovInfoFiles
INFO: Found 1 gcov info files.
Sep 23, 2024 5:49:19 PM com.google.devtools.coverageoutputgenerator.Main parseFilesSequentially
INFO: Parsing file /private/var/tmp/_bazel_oliver/428b4df1ffa12884ed645567c097dd18/sandbox/darwin-sandbox/37/execroot/coverage-example/bazel-out/darwin_arm64-fastbuild/testlogs/test/lib_test/_coverage/_cc_coverage.gcov
Sep 23, 2024 5:49:19 PM com.google.devtools.coverageoutputgenerator.Main getGcovJsonInfoFiles
INFO: No gcov json file found.
Sep 23, 2024 5:49:19 PM com.google.devtools.coverageoutputgenerator.Main getProfdataFileOrNull
INFO: No .profdata file found.
================================================================================
ERROR: /Users/oliver/repos/basic-coverage-example/test/BUILD.bazel:1:8: Error while validating output TreeArtifact File:[[]bazel-out/darwin_arm64-fastbuild/testlogs]test/lib_test/_coverage : Child gcov of tree artifact /private/var/tmp/_bazel_oliver/428b4df1ffa12884ed645567c097dd18/execroot/coverage-example/bazel-out/darwin_arm64-fastbuild/testlogs/test/lib_test/_coverage is a dangling symbolic link
ERROR: /Users/oliver/repos/basic-coverage-example/test/BUILD.bazel:1:8: Testing //test:lib_test failed: not all outputs were created or valid
```
### Which category does this issue belong to?
_No response_
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
clone https://github.com/oliverlee/basic-coverage-example and run:
```
bazel coverage //... --instrumentation_filter=//:lib --config=gcov --experimental_fetch_all_coverage_outputs
```
### Which operating system are you running Bazel on?
macOS 14.6
### What is the output of `bazel info release`?
7.1.0
### 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` ?
_No response_
### 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
Assessment
This issue has not been assessed yet.