|
49 | 49 | import com.facebook.buck.features.halide.HalideBuckConfig;
|
50 | 50 | import com.facebook.buck.rules.keys.config.RuleKeyConfiguration;
|
51 | 51 | import com.facebook.buck.swift.SwiftBuckConfig;
|
52 |
| -import com.facebook.buck.util.Optionals; |
| 52 | +import com.facebook.buck.util.RichStream; |
53 | 53 | import com.facebook.buck.util.json.ObjectMappers;
|
54 | 54 | import com.google.common.annotations.VisibleForTesting;
|
55 | 55 | import com.google.common.base.Preconditions;
|
@@ -253,7 +253,7 @@ public Path generateWorkspaceAndDependentProjects(
|
253 | 253 |
|
254 | 254 | ImmutableSet<BuildTarget> targetsInRequiredProjects =
|
255 | 255 | Stream.concat(
|
256 |
| - schemeNameToSrcTargetNode.values().stream().flatMap(Optionals::toStream), |
| 256 | + schemeNameToSrcTargetNode.values().stream().flatMap(RichStream::from), |
257 | 257 | buildForTestNodes.values().stream())
|
258 | 258 | .map(TargetNode::getBuildTarget)
|
259 | 259 | .collect(ImmutableSet.toImmutableSet());
|
@@ -1069,7 +1069,7 @@ private void buildWorkspaceSchemeTests(
|
1069 | 1069 | for (String schemeName : schemeNameToSrcTargetNode.keySet()) {
|
1070 | 1070 | ImmutableSet<TargetNode<?>> targetNodes =
|
1071 | 1071 | schemeNameToSrcTargetNode.get(schemeName).stream()
|
1072 |
| - .flatMap(Optionals::toStream) |
| 1072 | + .flatMap(RichStream::from) |
1073 | 1073 | .collect(ImmutableSet.toImmutableSet());
|
1074 | 1074 | ImmutableSet<TargetNode<AppleTestDescriptionArg>> testNodes =
|
1075 | 1075 | getOrderedTestNodes(
|
@@ -1187,7 +1187,7 @@ private void writeWorkspaceSchemes(
|
1187 | 1187 | ImmutableSet<PBXTarget> orderedBuildTargets =
|
1188 | 1188 | schemeNameToSrcTargetNode.get(schemeName).stream()
|
1189 | 1189 | .distinct()
|
1190 |
| - .flatMap(Optionals::toStream) |
| 1190 | + .flatMap(RichStream::from) |
1191 | 1191 | .map(TargetNode::getBuildTarget)
|
1192 | 1192 | .map(buildTargetToPBXTarget::get)
|
1193 | 1193 | .filter(Objects::nonNull)
|
|
0 commit comments