aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-22 11:42:34 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-22 11:53:26 +0000
commit9e4c78fb5752fa554db82815f7336255831a95ab (patch)
treefdf498cf18c1e875fc4be3d00afb5f99583ee1a9 /src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
parent8ed31f05e664e925ad628ab47feeaaab30c26283 (diff)
*** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java b/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
index 0c45b89d25..c2fad0a482 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
@@ -192,22 +192,17 @@ public final class SourceManifestAction extends AbstractFileWriteAction {
protected String computeKey() {
Fingerprint f = new Fingerprint();
f.addString(GUID);
- f.addBoolean(runfiles.getLegacyExternalRunfiles());
- Map<PathFragment, Artifact> symlinks = runfiles.getSymlinksAsMap();
+ Map<PathFragment, Artifact> symlinks = runfiles.getSymlinksAsMap(null);
f.addInt(symlinks.size());
for (Map.Entry<PathFragment, Artifact> symlink : symlinks.entrySet()) {
f.addPath(symlink.getKey());
- if (symlink.getValue() != null) {
- f.addPath(symlink.getValue().getPath());
- }
+ f.addPath(symlink.getValue().getPath());
}
Map<PathFragment, Artifact> rootSymlinks = runfiles.getRootSymlinksAsMap(null);
f.addInt(rootSymlinks.size());
for (Map.Entry<PathFragment, Artifact> rootSymlink : rootSymlinks.entrySet()) {
f.addPath(rootSymlink.getKey());
- if (rootSymlink.getValue() != null) {
- f.addPath(rootSymlink.getValue().getPath());
- }
+ f.addPath(rootSymlink.getValue().getPath());
}
for (Artifact artifact : runfiles.getArtifactsWithoutMiddlemen()) {
@@ -299,18 +294,16 @@ public final class SourceManifestAction extends AbstractFileWriteAction {
private final Artifact output;
private final Runfiles.Builder runfilesBuilder;
- public Builder(
- String prefix, ManifestType manifestType, ActionOwner owner, Artifact output,
- boolean legacyExternalRunfiles) {
- this.runfilesBuilder = new Runfiles.Builder(prefix, legacyExternalRunfiles);
+ public Builder(String prefix, ManifestType manifestType, ActionOwner owner, Artifact output) {
+ this.runfilesBuilder = new Runfiles.Builder(prefix);
manifestWriter = manifestType;
this.owner = owner;
this.output = output;
}
- @VisibleForTesting // Only used for testing.
+ @VisibleForTesting
Builder(String prefix, ManifestWriter manifestWriter, ActionOwner owner, Artifact output) {
- this.runfilesBuilder = new Runfiles.Builder(prefix, false);
+ this.runfilesBuilder = new Runfiles.Builder(prefix);
this.manifestWriter = manifestWriter;
this.owner = owner;
this.output = output;