|
22 | 22 | import com.google.common.base.VerifyException;
|
23 | 23 | import com.google.common.collect.ImmutableList;
|
24 | 24 | import com.google.common.collect.ImmutableMap;
|
25 |
| -import com.google.common.collect.ImmutableSet; |
26 | 25 | import com.google.common.collect.Iterables;
|
27 | 26 | import com.google.common.collect.LinkedHashMultimap;
|
28 | 27 | import com.google.common.collect.LinkedListMultimap;
|
|
51 | 50 | import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
|
52 | 51 | import com.google.devtools.build.lib.analysis.config.PatchTransition;
|
53 | 52 | import com.google.devtools.build.lib.cmdline.Label;
|
54 |
| -import com.google.devtools.build.lib.cmdline.RepositoryName; |
55 | 53 | import com.google.devtools.build.lib.collect.nestedset.NestedSet;
|
56 | 54 | import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
|
57 | 55 | import com.google.devtools.build.lib.collect.nestedset.Order;
|
|
71 | 69 | import com.google.devtools.build.lib.packages.SkylarkProviderIdentifier;
|
72 | 70 | import com.google.devtools.build.lib.packages.Target;
|
73 | 71 | import com.google.devtools.build.lib.packages.TargetUtils;
|
74 |
| -import com.google.devtools.build.lib.rules.repository.RepositoryVisibilityFunction; |
75 |
| -import com.google.devtools.build.lib.rules.repository.RepositoryVisibilityFunction.RepositoryVisibilityValue; |
76 | 72 | import com.google.devtools.build.lib.skyframe.AspectFunction.AspectCreationException;
|
77 | 73 | import com.google.devtools.build.lib.skyframe.AspectValue.AspectKey;
|
78 | 74 | import com.google.devtools.build.lib.skyframe.SkyframeExecutor.BuildViewProvider;
|
|
95 | 91 | import java.util.LinkedHashMap;
|
96 | 92 | import java.util.List;
|
97 | 93 | import java.util.Map;
|
98 |
| -import java.util.Map.Entry; |
99 | 94 | import java.util.Objects;
|
100 | 95 | import java.util.Set;
|
101 | 96 | import java.util.concurrent.Semaphore;
|
@@ -341,35 +336,6 @@ static OrderedSetMultimap<Attribute, ConfiguredTarget> computeDependencies(
|
341 | 336 | throw new DependencyEvaluationException(e);
|
342 | 337 | }
|
343 | 338 |
|
344 |
| - RepositoryName ctgRepository = ctgValue.getLabel().getPackageIdentifier().getRepository(); |
345 |
| - ImmutableSet.Builder<SkyKey> pairsToCheck = ImmutableSet.builder(); |
346 |
| - for (Dependency dep : depValueNames.values()) { |
347 |
| - RepositoryName depRepository = dep.getLabel().getPackageIdentifier().getRepository(); |
348 |
| - if (ctgRepository.equals(depRepository) || depRepository.isMain()) { |
349 |
| - continue; |
350 |
| - } |
351 |
| - pairsToCheck.add(RepositoryVisibilityFunction.key(ctgRepository, depRepository)); |
352 |
| - } |
353 |
| - Map<SkyKey, SkyValue> pairs = env.getValues(pairsToCheck.build()); |
354 |
| - if (env.valuesMissing()) { |
355 |
| - return null; |
356 |
| - } |
357 |
| - boolean hadError = false; |
358 |
| - for (Entry<SkyKey, SkyValue> entry : pairs.entrySet()) { |
359 |
| - if (!((RepositoryVisibilityValue) entry.getValue()).ok()) { |
360 |
| - RepositoryVisibilityFunction.Key key = |
361 |
| - (RepositoryVisibilityFunction.Key) entry.getKey().argument(); |
362 |
| - String message = ctgValue.getLabel() + " has a dependency on " |
363 |
| - + key.child() + " but does not define " + key.child() + " in its WORKSPACE"; |
364 |
| - env.getListener().handle(Event.error(message)); |
365 |
| - hadError = true; |
366 |
| - } |
367 |
| - } |
368 |
| - if (hadError) { |
369 |
| - throw new DependencyEvaluationException( |
370 |
| - new ConfiguredValueCreationException("Missing external repository definitions")); |
371 |
| - } |
372 |
| - |
373 | 339 | // Trim each dep's configuration so it only includes the fragments needed by its transitive
|
374 | 340 | // closure (only dynamic configurations support this).
|
375 | 341 | if (useDynamicConfigurations(ctgValue.getConfiguration())) {
|
|
0 commit comments