-
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
Execution root symlink forest includes all files in a package instead of only ones needed #19581
Comments
This appears to reproduce in all scenarios in Bazel 7 (tested on rc3). In other words, both |
This is unfortunately a known limitation of skymeld (#14057), which is on by default in Bazel 7. In this mode, we create a symlink to each entry under the source root. If this breaks you, please include If I understand correctly, the main nuisance here is with the |
Yes. If minimally that wasn't symlinked, we would be fine. One step more would to also not symlink anything in |
Sadly I will have to include that by default for |
@joeleba Should we Interestingly Bazel itself depends on source files in Lines 54 to 61 in 07a571f
.git may thus not be sufficiently configurable. Going by .bazelignore should cover this use case though.
|
@bazel-io flag |
what's the estimated effort to fix this? |
@bazel-io fork 7.0.0 |
Surfaced in #19581. PiperOrigin-RevId: 581877718 Change-Id: I8d9e460ac809ab236d04252ba14a5836d2e2d86c
…gnore`. Bazel in skymeld mode eagerly plants the symlinks from the execroot to every entries under the source tree. This leads to some pain points for certain groups of users (#19581). This CL offers a workaround for that issue. The users can now list the paths that they don't want Bazel to symlink to in the `.bazelignore` file in their project. PiperOrigin-RevId: 581919915 Change-Id: I329365b0655fc0bcb2db1eeea91ef74c775c72ae
…gnore`. Bazel in skymeld mode eagerly plants the symlinks from the execroot to every entries under the source tree. This leads to some pain points for certain groups of users (bazelbuild#19581). This CL offers a workaround for that issue. The users can now list the paths that they don't want Bazel to symlink to in the `.bazelignore` file in their project. PiperOrigin-RevId: 581919915 Change-Id: I329365b0655fc0bcb2db1eeea91ef74c775c72ae
…20168) Bazel in skymeld mode eagerly plants the symlinks from the execroot to every entries under the source tree. This leads to some pain points for certain groups of users (#19581). This CL offers a workaround for that issue. The users can now list the paths that they don't want Bazel to symlink to in the `.bazelignore` file in their project. Commit caf1702 PiperOrigin-RevId: 581919915 Change-Id: I329365b0655fc0bcb2db1eeea91ef74c775c72ae Co-authored-by: Googler <leba@google.com>
The commit that tells bazel to skip the paths listed in |
@joeleba Thanks! I assume that only applies to when using Skymeld? If we don't use Skymeld, |
That's true at least for Skymeld: the symlink planting should repect |
Sure, but the issue is when a target in the root package is built, it will symlink the |
Just confirmed that this is an issue for the |
Description of the bug:
When running a build, the symlink forest will include all files from a package beyond files actually needed, used, or referenced by a build.
This leads to various quality-of-life, and reproducibility issues.
An example of the output base from the open source
rules_xcodeproj
looks like this when a target in the root package is built: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.
bazel build tools:xcodeproj
cd
intobazel-output-base/execroot/_main/
cd
back to the workspace rootbazel build buildifier.check
.git
directoriesWhich operating system are you running Bazel on?
macOS 14.0
What is the output of
bazel info release
?release 6.4.0rc1
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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
This has existed for a while as a nuisance (if you traverse
bazel-out
), it almost always tricks tools into thinking it's a Git directory, but became a more acute problem in the iOS community with Xcode 15 as the IDE performance is extremely degraded trying to parse what Git views as an extremely large Git diff in the output base.bazelbuild.slack.com discussion
The text was updated successfully, but these errors were encountered: