-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
git_repository is not reproducible #18152
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Comments
Pavank1992
added
the
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
label
Apr 20, 2023
meteorcloudy
added
P2
We'll consider working on this in future. (Assignee optional)
and removed
untriaged
labels
Apr 25, 2023
Does it not remove it here bazel/tools/build_defs/repo/git.bzl Line 176 in 0d672f3
|
I guess this bug only happens when
|
@cameron-martin That looks very reasonable. Do you want to submit that as a PR? |
cameron-martin
added a commit
to cameron-martin/bazel
that referenced
this issue
Apr 29, 2023
…using strip_prefix Leaving the `.git` directory in an external repository makes the rule not reproducible, since this directory contains timestamps of when the fetch occurred. When strip_prefix is not specified, this directory is correctly cleaned up but not when strip_prefix is specified, since the `.git` directory lives in `.tmp_git_root`. Note that we cannot delete the whole `.tmp_git_root` directory, since the items in the root are symlinks to here. Fixes bazelbuild#18152.
fweikert
pushed a commit
to fweikert/bazel
that referenced
this issue
May 25, 2023
…using strip_prefix Leaving the `.git` directory in an external repository makes the rule not reproducible since this directory contains timestamps of when the fetch occurred. When strip_prefix is not specified, this directory is correctly cleaned up but not when strip_prefix is specified, since the `.git` directory lives in `.tmp_git_root`. Note that we cannot delete the whole `.tmp_git_root` directory, since the items in the root are symlinks to here. Fixes bazelbuild#18152. Closes bazelbuild#18271. PiperOrigin-RevId: 528962539 Change-Id: I03b0ee6e6b5464af2d28eb6dc05fb6e6f33afaa3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the bug:
The git_repository repository rule leaves the
.git
directory, either in the root or in.tmp_git_root
. This directory contains files that are not a function of the input attributes, for example.git/logs
contains files that contain timestamps of when the remote branch was fetched.This causes a real issue in rules_rust (bazelbuild/rules_rust#1927), since it generates targets that glob the entire external repository.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a git_repository repository rule, inspect the
.git/logs
directory and see that it contains timestamps.Which operating system are you running Bazel on?
Ubuntu 22.04
What is the output of
bazel info release
?release 6.1.0
If
bazel info release
returnsdevelopment 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 master; git rev-parse HEAD
?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
The text was updated successfully, but these errors were encountered: