bazel vendor bazel-external symlink is absolute
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
In our repo we're trying to vendor our external dependencies so we can ship them in a container image we can use on our CI, we started playing with different settings and found a behavior that's not expected, we can reproduce easily from the Bazel repository
### Which category does this issue belong to?
CLI
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```bash
$ cd /tmp
$ git clone --depth=1 https://github.com/bazelbuild/bazel
$ cd bazel
$ bazel --output_base=../output_base vendor --vendor_dir=../bazel-vendor src/tools/workspacelog:parser
$ readlink ../bazel-vendor/bazel-external
/tmp/output_base/external
```
This symlink should be relative to be able to move bazel-vendor across multiple environments
### Which operating system are you running Bazel on?
linux
### What is the output of `bazel info release`?
8.3.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` ?
```text
https://github.com/bazelbuild/bazel
71cc37f22d96c27994d66614219e68d44e20023b
```
### 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?
https://bazelbuild.slack.com/archives/C014RARENH0/p1751029538716839
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Reproduce the issue with the provided bazel vendor command and inspect the vendor implementation that creates bazel-external. Verify how the output directory is selected and how the symlink target is written. Done means the vendor directory can move between environments because bazel-external uses a relative target, with a regression test covering this case.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100