Stage repository mapping manifest as a root symlink#16652
Stage repository mapping manifest as a root symlink#16652fmeum wants to merge 4 commits intobazelbuild:masterfrom
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 |
lberki
left a comment
There was a problem hiding this comment.
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_mappingwith 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