-
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
Stage repository mapping manifest as a root symlink #16652
Conversation
26e7211
to
cbcf695
Compare
cbcf695
to
c09ed02
Compare
74c2ae1
to
9a94a20
Compare
@Wyverald Had to fix a check on Windows and added another one for good measure. |
This looks reasonable:
I have one suggestion: this creates an extra |
to confirm, does this mean we might in some cases have exactly one of |
I will try to implement it that way as I share this concern.
Yes, with |
@lberki There are number of places that directly consume |
9a94a20
to
46f5df9
Compare
46f5df9
to
5a2365d
Compare
@lberki I pushed a commit that wires up the root symlink without allocating a new |
@bazel-io flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is kind of ugly, but I don't have a better idea, either (other than the previous "create new Runfiles
instance" one, which I think is worse on the balance. Maybe add a comment to Runfiles.getRunfilesInputs()
that explains why the repo mapping manifest can't be there?
Conceptually, the issue is that Runfiles is now two things:
- What a configured target propagates upwards (and there is never a repo mapping manifest there)
- What is put in the symlink tree (there may be a repo mapping manifest here)
So maybe the best would be to create two separate classes for these two use cases, but I won't insist.
src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
Outdated
Show resolved
Hide resolved
By adding the repository mapping manifest to runfiles as a root symlink, it is staged as `foo.runfiles/_repo_mapping` with all execution strategies. This includes sandboxed and remote execution, which previously did not stage the manifest at all. As a side effect, runfiles libraries can now find the repository mapping manifest via `rlocation("_repo_mapping")`.
5a2365d
to
82fa1cb
Compare
I added a comment.
Fully agree, but that would be a bit over my head right now. |
@bazel-io fork 6.0.0 |
By adding the repository mapping manifest to runfiles as a root symlink, it is staged as `foo.runfiles/_repo_mapping` with all execution strategies. This includes sandboxed and remote execution, which previously did not stage the manifest at all. As a side effect, runfiles libraries can now find the repository mapping manifest via `rlocation("_repo_mapping")`. Fixes bazelbuild#16643 Work towards bazelbuild#16124 Closes bazelbuild#16652. PiperOrigin-RevId: 487532254 Change-Id: I9774b8930337c5967fce92a861cc0db71dea2f0f
By adding the repository mapping manifest to runfiles as a root symlink, it is staged as `foo.runfiles/_repo_mapping` with all execution strategies. This includes sandboxed and remote execution, which previously did not stage the manifest at all. As a side effect, runfiles libraries can now find the repository mapping manifest via `rlocation("_repo_mapping")`. Fixes bazelbuild#16643 Work towards bazelbuild#16124 Closes bazelbuild#16652. PiperOrigin-RevId: 487532254 Change-Id: I9774b8930337c5967fce92a861cc0db71dea2f0f
By adding the repository mapping manifest to runfiles as a root symlink, it is staged as `foo.runfiles/_repo_mapping` with all execution strategies. This includes sandboxed and remote execution, which previously did not stage the manifest at all. As a side effect, runfiles libraries can now find the repository mapping manifest via `rlocation("_repo_mapping")`. Fixes #16643 Work towards #16124 Closes #16652. PiperOrigin-RevId: 487532254 Change-Id: I9774b8930337c5967fce92a861cc0db71dea2f0f
By adding the repository mapping manifest to runfiles as a root symlink, it is staged as
foo.runfiles/_repo_mapping
with all execution strategies. This includes sandboxed and remote execution, which previously did not stage the manifest at all.As a side effect, runfiles libraries can now find the repository mapping manifest via
rlocation("_repo_mapping")
.Fixes #16643
Work towards #16124