bazelbuild / bazelbuild/bazel

[bazel.build] Problem with /rules/lib/builtins/runfiles

Open
#22,934 0 comments 0 reactions 0 assignees View on GitHub
team-Documentation type: documentation (cleanup) untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Page link:

https://bazel.build/rules/lib/builtins/runfiles

### Problem description (include actual vs expected text, if applicable):

When I use `bazel build` to build a `py_binary`, the runtime dependency files (runfiles) are created as symlinks. This causes the built `py_binary` to fail to execute if moved to another location because it can not find the source files. How can I configure the build process to copy the runfiles instead of creating symlinks?
BAZEL_VERSION==6.0.0

### Where do you see this issue? (include link to specific section of the page, if applicable)

_No response_

### Any other information you'd like to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked bazel.build rules/lib/builtins/runfiles page and reproduce the reported py_binary behavior with Bazel 6.0.0. Check the surrounding runfiles documentation for the appropriate configuration or limitation, then update the page so the expected behavior and any supported way to copy runtime dependencies are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.