Skip to content

Commit 31faec1

Browse files
committed
Remove erroneous check about a repo mapping entry with an empty apparent name
It turns out that not only the main repo can have such an entry; any repo generated by a module extension hosted in the main repo can (and will) also have such an entry, because they can see all repos that the main repo can see, which includes the main repo itself. PiperOrigin-RevId: 483938753 Change-Id: I6192496f2edf08c9b1723c5b041c0ac44f928b3e
1 parent cc5de1b commit 31faec1

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/main/java/com/google/devtools/build/lib/analysis/RepoMappingManifestAction.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static java.util.Comparator.comparing;
1818

1919
import com.google.auto.value.AutoValue;
20-
import com.google.common.base.Preconditions;
2120
import com.google.common.collect.ImmutableList;
2221
import com.google.devtools.build.lib.actions.ActionExecutionContext;
2322
import com.google.devtools.build.lib.actions.ActionKeyContext;
@@ -106,9 +105,6 @@ public DeterministicWriter newDeterministicWriter(ActionExecutionContext ctx)
106105
if (entry.targetRepoApparentName().isEmpty()) {
107106
// The apparent repo name can only be empty for the main repo. We skip this line as
108107
// Rlocation paths can't reference an empty apparent name anyway.
109-
Preconditions.checkArgument(
110-
entry.sourceRepo().isMain(),
111-
"only the main repo mapping can contain an entry with an empty apparent name");
112108
continue;
113109
}
114110
// The canonical name of the main repo is the empty string, which is not a valid name for a

0 commit comments

Comments
 (0)