Source:
<code>public PlatformRestrictionsResult checkPlatformRestrictions( ImmutableList<ConfiguredTarget> topLevelTargets, ImmutableSet<String> explicitTargetPatterns, boolean keepGoing) throws ViewCreationFailedException { <START> ImmutableSet.Builder<ConfiguredTarget> incompatibleTargets = ImmutableSet.builder(); <END> ImmutableSet.Builder<ConfiguredTarget> incompatibleButRequestedTargets = ImmutableSet.builder(); for (ConfiguredTarget target : topLevelTargets) { IncompatiblePlatformProvider incompatibleProvider = target.getProvider(IncompatiblePlatformProvider.class); if (incompatibleProvider == null) { continue; } String labelString = target.getLabel().getUnambiguousCanonicalForm(); if (explicitTargetPatterns.contains(labelString)) { if (!keepGoing) { String targetIncompatibleMessage = ("Target " + target.getLabel().toString() + " is incompatible and cannot be built, but was explicitly requested."); targetIncompatibleMessage += reportOnIncompatibility(target); throw new ViewCreationFailedException( targetIncompatibleMessage, FailureDetail.newBuilder() .setMessage(targetIncompatibleMessage) .setAnalysis(Analysis.newBuilder().setCode(Code.INCOMPATIBLE_TARGET_REQUESTED)) .build()); } this.eventHandler.handle( Event.warn( "Incompatible target " + labelString + " was explicitly requested: it will not be built")); incompatibleButRequestedTargets.add(target); } else { incompatibleTargets.add(target); } } return new PlatformRestrictionsResult( ImmutableSet.copyOf(incompatibleTargets.build()), ImmutableSet.copyOf(incompatibleButRequestedTargets.build())); }</code><technical_language>explicitTargetPatterns leading @ for in main repository? need clarify a precondition well</technical_language>

Target:
public PlatformRestrictionsResult checkPlatformRestrictions( ImmutableList<ConfiguredTarget> topLevelTargets, ImmutableSet<String> explicitTargetPatterns, boolean keepGoing) throws ViewCreationFailedException { ImmutableSet.Builder<ConfiguredTarget> incompatibleTargets = ImmutableSet.builder(); ImmutableSet.Builder<ConfiguredTarget> incompatibleButRequestedTargets = ImmutableSet.builder(); for (ConfiguredTarget target : topLevelTargets) { IncompatiblePlatformProvider incompatibleProvider = target.getProvider(IncompatiblePlatformProvider.class); if (incompatibleProvider == null) { continue; } String labelString = target.getLabel().getUnambiguousCanonicalForm(); if (explicitTargetPatterns.contains(labelString)) { if (!keepGoing) { String targetIncompatibleMessage = String.format( TARGET_INCOMPATIBLE_ERROR_TEMPLATE, target.getLabel().toString(), reportOnIncompatibility(target)); throw new ViewCreationFailedException( targetIncompatibleMessage, FailureDetail.newBuilder() .setMessage(targetIncompatibleMessage) .setAnalysis(Analysis.newBuilder().setCode(Code.INCOMPATIBLE_TARGET_REQUESTED)) .build()); } this.eventHandler.handle( Event.warn(String.format(TARGET_INCOMPATIBLE_ERROR_TEMPLATE, labelString, ""))); incompatibleButRequestedTargets.add(target); } else { incompatibleTargets.add(target); } } return PlatformRestrictionsResult.builder() .targetsToSkip(ImmutableSet.copyOf(incompatibleTargets.build())) .targetsWithErrors(ImmutableSet.copyOf(incompatibleButRequestedTargets.build())) .build(); }