Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor mode does not remap cross-repo symlinks to vendor dir #22303

Open
peakschris opened this issue May 9, 2024 · 1 comment
Open

Vendor mode does not remap cross-repo symlinks to vendor dir #22303

peakschris opened this issue May 9, 2024 · 1 comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged

Comments

@peakschris
Copy link

Description of the bug:

When vendoring a repo such as rules_helm, which contains symlinks between its sub-repos, the symlinks are not remapped on vendoring. This means the resulting directories in the vendor_dir contains symlinks into the bazel user cache, and become dangling if the vendor_dir is copied to a different machine.

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.

Module.bazel:
bazel_dep(name = "rules_helm", version = "0.3.2")

bazel vendor --vendor_dir=vendor
dir vendor\rules_helm~~helm~helm\helm.exe
<note resulting file is a symlink that points into user cache>

Which operating system are you running Bazel on?

windows, but I suspect this is a general problem

What is the output of bazel info release?

7.2.0 latest (8c6220a)

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

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

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

There is also an issue in rules_helm on Windows with the rules_helm symlink, but this is unrelated to this reported issue: abrisco/rules_helm#78. I have validated this by fixing the rules_helm issue locally.

@sgowroji sgowroji added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label May 9, 2024
@fmeum
Copy link
Collaborator

fmeum commented May 9, 2024

This is the relevant line in rules_helm:
https://github.com/abrisco/rules_helm/blob/main/helm/repositories.bzl#L130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged
Projects
None yet
Development

No branches or pull requests

5 participants