use of com.google.idea.blaze.base.ideinfo.TargetIdeInfo in project intellij by bazelbuild.
the class FastBuildIncrementalCompilerImpl method recursivelyAddModifiedJavaSources.
private void recursivelyAddModifiedJavaSources(ArtifactLocationDecoder artifactLocationDecoder, TargetMap targetMap, TargetKey targetKey, Set<TargetKey> seenTargets, Set<File> sourceFiles, Set<File> modifiedSinceBuild) {
if (seenTargets.contains(targetKey)) {
return;
}
seenTargets.add(targetKey);
TargetIdeInfo targetIdeInfo = targetMap.get(targetKey);
if (targetIdeInfo == null) {
return;
}
artifactLocationDecoder.decodeAll(targetIdeInfo.sources).stream().filter(file -> file.getName().endsWith(".java")).filter(modifiedSinceBuild::contains).forEach(sourceFiles::add);
targetIdeInfo.dependencies.forEach(dep -> recursivelyAddModifiedJavaSources(artifactLocationDecoder, targetMap, dep.targetKey, seenTargets, sourceFiles, modifiedSinceBuild));
}
use of com.google.idea.blaze.base.ideinfo.TargetIdeInfo in project intellij by bazelbuild.
the class FastBuildServiceImpl method checkLabelIsSupported.
private void checkLabelIsSupported(Label label) {
BlazeProjectData blazeProjectData = projectDataManager.getBlazeProjectData();
checkState(blazeProjectData != null, "this is not a blaze project");
TargetIdeInfo ideInfo = blazeProjectData.targetMap.get(TargetKey.forPlainTarget(label));
checkArgument(ideInfo != null, "label %s is not found, run a blaze sync?", label);
checkArgument(supportsFastBuilds(ideInfo.kind), "fast builds are not supported for %s targets", ideInfo.kind);
}
Aggregations