Search in sources :

Example 6 with BlazeArtifact

use of com.google.idea.blaze.base.command.buildresult.BlazeArtifact in project intellij by bazelbuild.

the class UnpackedAarsTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    writingOutputSink = new WritingOutputSink();
    context = BlazeContext.create();
    context.addOutputSink(PrintOutput.class, writingOutputSink);
    workspaceRoot = new WorkspaceRoot(folder.getRoot());
    localArtifactLocationDecoder = new MockArtifactLocationDecoder() {

        @Override
        public File decode(ArtifactLocation artifactLocation) {
            return new File(workspaceRoot.directory(), artifactLocation.getRelativePath());
        }
    };
    remoteArtifactLocationDecoder = new MockArtifactLocationDecoder() {

        @Override
        public File decode(ArtifactLocation artifactLocation) {
            return new File(workspaceRoot.directory(), artifactLocation.getRelativePath());
        }

        @Override
        public BlazeArtifact resolveOutput(ArtifactLocation artifact) {
            if (!artifact.isSource()) {
                File file = new File(workspaceRoot.directory(), artifact.getRelativePath());
                // when the remote artifact cannot be resolved, it will guess it as local artifact.
                return file.exists() ? new FakeRemoteOutputArtifact(file) : super.resolveOutput(artifact);
            }
            return super.resolveOutput(artifact);
        }
    };
    projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager(project));
    try {
        File projectDataDirectory = folder.newFolder("projectdata");
        BlazeImportSettings dummyImportSettings = new BlazeImportSettings("", "", projectDataDirectory.getAbsolutePath(), "", BuildSystemName.Bazel);
        BlazeImportSettingsManager.getInstance(project).setImportSettings(dummyImportSettings);
    } catch (IOException e) {
        throw new AssertionError("Fail to create directory for test", e);
    }
    applicationServices.register(FileOperationProvider.class, new FileOperationProvider());
    applicationServices.register(RemoteArtifactPrefetcher.class, new DefaultPrefetcher());
    projectServices.register(UnpackedAars.class, new UnpackedAars(project));
    registerExtensionPoint(FileCache.EP_NAME, FileCache.class).registerExtension(new FileCacheAdapter());
    registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class).registerExtension(new BlazeAndroidSyncPlugin());
    registerExtensionPoint(BlazeLibrarySorter.EP_NAME, BlazeLibrarySorter.class);
    applicationServices.register(ExperimentService.class, new MockExperimentService());
}
Also used : BlazeImportSettingsManager(com.google.idea.blaze.base.settings.BlazeImportSettingsManager) MockExperimentService(com.google.idea.common.experiments.MockExperimentService) BlazeImportSettings(com.google.idea.blaze.base.settings.BlazeImportSettings) BlazeAndroidSyncPlugin(com.google.idea.blaze.android.sync.BlazeAndroidSyncPlugin) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) MockArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.MockArtifactLocationDecoder) IOException(java.io.IOException) WorkspaceRoot(com.google.idea.blaze.base.model.primitives.WorkspaceRoot) FileCache(com.google.idea.blaze.base.filecache.FileCache) FileCacheAdapter(com.google.idea.blaze.android.libraries.UnpackedAars.FileCacheAdapter) FileOperationProvider(com.google.idea.blaze.base.io.FileOperationProvider) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) BlazeSyncPlugin(com.google.idea.blaze.base.sync.BlazeSyncPlugin) DefaultPrefetcher(com.google.idea.blaze.base.prefetch.DefaultPrefetcher) File(java.io.File)

Example 7 with BlazeArtifact

use of com.google.idea.blaze.base.command.buildresult.BlazeArtifact in project intellij by bazelbuild.

the class FileCacheDiffer method readTimestamps.

private static ImmutableMap<File, Long> readTimestamps(Map<String, ? extends BlazeArtifact> newOutputs, Map<String, File> cachedFiles) throws InterruptedException, ExecutionException {
    boolean timestampsRequired = newOutputs.values().stream().anyMatch(a -> a instanceof LocalFileArtifact);
    if (!timestampsRequired) {
        return ImmutableMap.of();
    }
    Set<File> relevantFiles = new HashSet<>();
    for (Map.Entry<String, ? extends BlazeArtifact> entry : newOutputs.entrySet()) {
        BlazeArtifact newOutput = entry.getValue();
        boolean needsTimestamp = newOutput instanceof LocalFileArtifact;
        if (!needsTimestamp) {
            continue;
        }
        relevantFiles.add(((LocalFileArtifact) newOutput).getFile());
        File cached = cachedFiles.get(entry.getKey());
        if (cached != null) {
            relevantFiles.add(cached);
        }
    }
    return ModifiedTimeScanner.readTimestamps(relevantFiles);
}
Also used : LocalFileArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact.LocalFileArtifact) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) File(java.io.File) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) Map(java.util.Map) HashSet(java.util.HashSet)

Example 8 with BlazeArtifact

use of com.google.idea.blaze.base.command.buildresult.BlazeArtifact in project intellij by bazelbuild.

the class JarCache method getArtifactsToCache.

/**
 * Returns a map from cache key to BlazeArtifact, for all the artifacts which should be cached.
 */
private static ImmutableMap<String, BlazeArtifact> getArtifactsToCache(ProjectViewSet projectViewSet, BlazeProjectData projectData) {
    List<LibraryArtifact> jarLibraries = BlazeLibraryCollector.getLibraries(projectViewSet, projectData).stream().filter(library -> library instanceof BlazeJarLibrary).map(library -> ((BlazeJarLibrary) library).libraryArtifact).collect(Collectors.toList());
    ArtifactLocationDecoder decoder = projectData.getArtifactLocationDecoder();
    Map<String, BlazeArtifact> newOutputs = new HashMap<>();
    for (LibraryArtifact lib : jarLibraries) {
        BlazeArtifact jar = decoder.resolveOutput(lib.jarForIntellijLibrary());
        newOutputs.put(cacheKeyForJar(jar), jar);
        for (ArtifactLocation sourceJar : lib.getSourceJars()) {
            BlazeArtifact srcJar = decoder.resolveOutput(sourceJar);
            newOutputs.put(cacheKeyForSourceJar(srcJar), srcJar);
        }
    }
    LintJarHelper.collectLintJarsArtifacts(projectData).forEach(jar -> newOutputs.put(cacheKeyForJar(jar), jar));
    return ImmutableMap.copyOf(newOutputs);
}
Also used : Arrays(java.util.Arrays) ProjectViewManager(com.google.idea.blaze.base.projectview.ProjectViewManager) BlazeProjectData(com.google.idea.blaze.base.model.BlazeProjectData) Map(java.util.Map) FileUtil(com.intellij.openapi.util.io.FileUtil) FileSizeScanner(com.google.idea.blaze.base.io.FileSizeScanner) BlazeBuildOutputs(com.google.idea.blaze.base.sync.aspects.BlazeBuildOutputs) Logger(com.intellij.openapi.diagnostic.Logger) Blaze(com.google.idea.blaze.base.settings.Blaze) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Collection(java.util.Collection) FutureUtil(com.google.idea.blaze.base.async.FutureUtil) RemoteArtifactPrefetcher(com.google.idea.blaze.base.prefetch.RemoteArtifactPrefetcher) PrintOutput(com.google.idea.blaze.base.scope.output.PrintOutput) Collectors(java.util.stream.Collectors) FileOperationProvider(com.google.idea.blaze.base.io.FileOperationProvider) BlazeProjectDataManager(com.google.idea.blaze.base.sync.data.BlazeProjectDataManager) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) OutputArtifact(com.google.idea.blaze.base.command.buildresult.OutputArtifact) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) List(java.util.List) ServiceManager(com.intellij.openapi.components.ServiceManager) RemoteOutputArtifact(com.google.idea.blaze.base.command.buildresult.RemoteOutputArtifact) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) SyncMode(com.google.idea.blaze.base.sync.SyncMode) ApplicationManager(com.intellij.openapi.application.ApplicationManager) Optional(java.util.Optional) FetchExecutor(com.google.idea.blaze.base.prefetch.FetchExecutor) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) LibraryArtifact(com.google.idea.blaze.base.ideinfo.LibraryArtifact) FileCacheDiffer(com.google.idea.blaze.base.filecache.FileCacheDiffer) HashMap(java.util.HashMap) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) FileCache(com.google.idea.blaze.base.filecache.FileCache) BlazeJarLibrary(com.google.idea.blaze.java.sync.model.BlazeJarLibrary) ImmutableList(com.google.common.collect.ImmutableList) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) Project(com.intellij.openapi.project.Project) BlazeJavaUserSettings(com.google.idea.blaze.java.settings.BlazeJavaUserSettings) Nullable(javax.annotation.Nullable) RemoteOutputArtifacts(com.google.idea.blaze.base.model.RemoteOutputArtifacts) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) Files(java.nio.file.Files) BlazeLibraryCollector(com.google.idea.blaze.base.sync.libraries.BlazeLibraryCollector) SourceArtifact(com.google.idea.blaze.base.command.buildresult.SourceArtifact) IOException(java.io.IOException) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Futures(com.google.common.util.concurrent.Futures) Paths(java.nio.file.Paths) LocalFileArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact.LocalFileArtifact) VisibleForTesting(com.google.common.annotations.VisibleForTesting) PathUtil(com.intellij.util.PathUtil) EventType(com.google.idea.blaze.base.scope.scopes.TimingScope.EventType) InputStream(java.io.InputStream) HashMap(java.util.HashMap) BlazeJarLibrary(com.google.idea.blaze.java.sync.model.BlazeJarLibrary) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) LibraryArtifact(com.google.idea.blaze.base.ideinfo.LibraryArtifact)

Example 9 with BlazeArtifact

use of com.google.idea.blaze.base.command.buildresult.BlazeArtifact in project intellij by bazelbuild.

the class PackageManifestReader method readPackageManifestFiles.

/**
 * @return A map from java source absolute file path to declared package string.
 */
public Map<TargetKey, Map<ArtifactLocation, String>> readPackageManifestFiles(Project project, BlazeContext context, ArtifactLocationDecoder decoder, Map<TargetKey, ArtifactLocation> javaPackageManifests, ListeningExecutorService executorService) {
    Map<OutputArtifact, TargetKey> fileToLabelMap = Maps.newHashMap();
    for (Map.Entry<TargetKey, ArtifactLocation> entry : javaPackageManifests.entrySet()) {
        TargetKey key = entry.getKey();
        BlazeArtifact artifact = decoder.resolveOutput(entry.getValue());
        if (artifact instanceof OutputArtifact) {
            fileToLabelMap.put((OutputArtifact) artifact, key);
        }
    }
    ArtifactsDiff diff;
    try {
        diff = ArtifactsDiff.diffArtifacts(artifactState, fileToLabelMap.keySet());
        artifactState = diff.getNewState();
    } catch (InterruptedException e) {
        throw new ProcessCanceledException(e);
    } catch (ExecutionException e) {
        context.setHasError();
        IssueOutput.error("Updating package manifest files failed: " + e).submit(context);
        throw new AssertionError("Unhandled exception", e);
    }
    // Find all not cached {@link RemoteOutputArtifact} and download them before parsing manifest
    // file
    ImmutableList<RemoteOutputArtifact> toDownload = BlazeArtifact.getRemoteArtifacts(diff.getUpdatedOutputs()).stream().filter(a -> findArtifactInCache(project, a) == null).collect(toImmutableList());
    ListenableFuture<?> fetchRemoteArtifactFuture = RemoteArtifactPrefetcher.getInstance().downloadArtifacts(project.getName(), toDownload);
    ListenableFuture<PrefetchStats> fetchLocalFilesFuture = PrefetchService.getInstance().prefetchFiles(BlazeArtifact.getLocalFiles(diff.getUpdatedOutputs()), true, false);
    if (!FutureUtil.waitForFuture(context, Futures.allAsList(fetchRemoteArtifactFuture, fetchLocalFilesFuture)).timed("FetchPackageManifests", EventType.Prefetching).withProgressMessage("Reading package manifests...").run().success()) {
        return null;
    }
    try {
        long bytesConsumed = toDownload.stream().mapToLong(RemoteOutputArtifact::getLength).sum() + fetchLocalFilesFuture.get().bytesPrefetched();
        if (bytesConsumed > 0) {
            context.output(new NetworkTrafficUsedOutput(bytesConsumed, "packagemanifest"));
        }
    } catch (InterruptedException | ExecutionException e) {
        // Should never happen - the future has already completed.
        logger.error(e);
    // carry on - failing to log the stats should not affect anything else.
    }
    List<ListenableFuture<Void>> futures = Lists.newArrayList();
    for (OutputArtifact file : diff.getUpdatedOutputs()) {
        futures.add(executorService.submit(() -> {
            Map<ArtifactLocation, String> manifest = parseManifestFile(project, file);
            manifestMap.put(fileToLabelMap.get(file), manifest);
            return null;
        }));
    }
    for (ArtifactState file : diff.getRemovedOutputs()) {
        TargetKey key = this.fileToLabelMap.get(file);
        if (key != null) {
            manifestMap.remove(key);
        }
    }
    this.fileToLabelMap = fileToLabelMap.entrySet().stream().filter(e -> diff.getNewState().containsKey(e.getKey().getKey())).collect(toImmutableMap(e -> e.getKey().toArtifactState(), Map.Entry::getValue));
    try {
        Futures.allAsList(futures).get();
    } catch (ExecutionException | InterruptedException e) {
        logger.error(e);
        throw new IllegalStateException("Could not read sources");
    }
    return manifestMap;
}
Also used : BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) BufferedInputStream(java.io.BufferedInputStream) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) PrefetchService(com.google.idea.blaze.base.prefetch.PrefetchService) HashMap(java.util.HashMap) NetworkTrafficUsedOutput(com.google.idea.blaze.base.scope.scopes.NetworkTrafficTrackingScope.NetworkTrafficUsedOutput) ArtifactsDiff(com.google.idea.blaze.base.filecache.ArtifactsDiff) ProcessCanceledException(com.intellij.openapi.progress.ProcessCanceledException) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) ArtifactState(com.google.idea.blaze.base.filecache.ArtifactState) Map(java.util.Map) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) Project(com.intellij.openapi.project.Project) Logger(com.intellij.openapi.diagnostic.Logger) Nullable(javax.annotation.Nullable) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) ImmutableMap(com.google.common.collect.ImmutableMap) StringUtil(com.intellij.openapi.util.text.StringUtil) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Common(com.google.devtools.intellij.aspect.Common) PackageManifest(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.PackageManifest) FutureUtil(com.google.idea.blaze.base.async.FutureUtil) InputStreamProvider(com.google.idea.blaze.base.io.InputStreamProvider) IOException(java.io.IOException) RemoteArtifactPrefetcher(com.google.idea.blaze.base.prefetch.RemoteArtifactPrefetcher) FileInputStream(java.io.FileInputStream) Maps(com.google.common.collect.Maps) RemoteOutputsCache(com.google.idea.blaze.base.filecache.RemoteOutputsCache) File(java.io.File) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) OutputArtifact(com.google.idea.blaze.base.command.buildresult.OutputArtifact) ExecutionException(java.util.concurrent.ExecutionException) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) Futures(com.google.common.util.concurrent.Futures) JavaSourcePackage(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.JavaSourcePackage) List(java.util.List) PrefetchStats(com.google.idea.blaze.base.prefetch.PrefetchStats) ServiceManager(com.intellij.openapi.components.ServiceManager) RemoteOutputArtifact(com.google.idea.blaze.base.command.buildresult.RemoteOutputArtifact) TargetKey(com.google.idea.blaze.base.ideinfo.TargetKey) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) Joiner(com.google.common.base.Joiner) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) EventType(com.google.idea.blaze.base.scope.scopes.TimingScope.EventType) InputStream(java.io.InputStream) ArtifactsDiff(com.google.idea.blaze.base.filecache.ArtifactsDiff) ArtifactState(com.google.idea.blaze.base.filecache.ArtifactState) PrefetchStats(com.google.idea.blaze.base.prefetch.PrefetchStats) NetworkTrafficUsedOutput(com.google.idea.blaze.base.scope.scopes.NetworkTrafficTrackingScope.NetworkTrafficUsedOutput) OutputArtifact(com.google.idea.blaze.base.command.buildresult.OutputArtifact) RemoteOutputArtifact(com.google.idea.blaze.base.command.buildresult.RemoteOutputArtifact) ExecutionException(java.util.concurrent.ExecutionException) ProcessCanceledException(com.intellij.openapi.progress.ProcessCanceledException) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) RemoteOutputArtifact(com.google.idea.blaze.base.command.buildresult.RemoteOutputArtifact) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) TargetKey(com.google.idea.blaze.base.ideinfo.TargetKey) HashMap(java.util.HashMap) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap)

Example 10 with BlazeArtifact

use of com.google.idea.blaze.base.command.buildresult.BlazeArtifact in project intellij by bazelbuild.

the class JdepsFileReader method doLoadJdepsFiles.

@Nullable
private JdepsState doLoadJdepsFiles(Project project, BlazeContext context, ArtifactLocationDecoder decoder, @Nullable JdepsState oldState, Collection<TargetIdeInfo> targetsToLoad, SyncMode syncMode) throws InterruptedException, ExecutionException {
    Map<OutputArtifact, TargetKey> fileToTargetMap = Maps.newHashMap();
    for (TargetIdeInfo target : targetsToLoad) {
        BlazeArtifact output = resolveJdepsOutput(decoder, target);
        if (output instanceof OutputArtifact) {
            fileToTargetMap.put((OutputArtifact) output, target.getKey());
        }
    }
    ArtifactsDiff diff = ArtifactsDiff.diffArtifacts(oldState != null ? oldState.getArtifactState() : null, fileToTargetMap.keySet());
    // TODO: handle prefetching for arbitrary OutputArtifacts
    List<OutputArtifact> outputArtifacts = diff.getUpdatedOutputs();
    // already. Additional logging to identify what is going wrong.
    if (!outputArtifacts.isEmpty() && !syncMode.involvesBlazeBuild()) {
        logger.warn("ArtifactDiff: " + outputArtifacts.size() + " outputs need to be updated during SyncMode.NO_BUILD ");
        if (oldState == null) {
            logger.warn("ArtifactDiff: oldState == null, we failed to load prior JdepsState.");
        } else {
            // Do not list all artifacts since it may be pretty long.
            if (oldState.getArtifactState().size() != fileToTargetMap.size()) {
                logger.warn("Existing artifact state does not match with target map." + " [oldState.getArtifactState().size() = " + oldState.getArtifactState().size() + ", fileToTargetMap.size() = " + fileToTargetMap.size() + "]");
            }
        }
    }
    ListenableFuture<?> downloadArtifactsFuture = RemoteArtifactPrefetcher.getInstance().downloadArtifacts(/* projectName= */
    project.getName(), /* outputArtifacts= */
    BlazeArtifact.getRemoteArtifacts(outputArtifacts));
    ListenableFuture<?> fetchLocalFilesFuture = PrefetchService.getInstance().prefetchFiles(BlazeArtifact.getLocalFiles(outputArtifacts), true, false);
    if (!FutureUtil.waitForFuture(context, Futures.allAsList(downloadArtifactsFuture, fetchLocalFilesFuture)).timed("FetchJdeps", EventType.Prefetching).withProgressMessage("Reading jdeps files...").run().success()) {
        return null;
    }
    AtomicLong totalSizeLoaded = new AtomicLong(0);
    List<ListenableFuture<Result>> futures = Lists.newArrayList();
    for (OutputArtifact updatedFile : outputArtifacts) {
        futures.add(FetchExecutor.EXECUTOR.submit(() -> {
            totalSizeLoaded.addAndGet(updatedFile.getLength());
            try (InputStream inputStream = updatedFile.getInputStream()) {
                Deps.Dependencies dependencies = Deps.Dependencies.parseFrom(inputStream);
                if (dependencies == null) {
                    return null;
                }
                List<String> deps = dependencies.getDependencyList().stream().filter(dep -> relevantDep(dep)).map(Dependency::getPath).collect(toImmutableList());
                TargetKey targetKey = fileToTargetMap.get(updatedFile);
                return new Result(updatedFile, targetKey, deps);
            } catch (IOException e) {
                logger.info("Could not read jdeps file: " + updatedFile);
                return null;
            }
        }));
    }
    JdepsState.Builder state = JdepsState.builder();
    if (oldState != null) {
        state.list.addAll(oldState.data);
    }
    state.removeArtifacts(diff.getUpdatedOutputs().stream().map(OutputArtifact::toArtifactState).collect(toImmutableList()));
    state.removeArtifacts(diff.getRemovedOutputs());
    for (Result result : Futures.allAsList(futures).get()) {
        if (result != null) {
            state.list.add(JdepsData.create(result.targetKey, result.dependencies, result.output.toArtifactState()));
        }
    }
    context.output(PrintOutput.log(String.format("Loaded %d jdeps files, total size %dkB", diff.getUpdatedOutputs().size(), totalSizeLoaded.get() / 1024)));
    return state.build();
}
Also used : BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) PrefetchService(com.google.idea.blaze.base.prefetch.PrefetchService) Dependency(com.google.devtools.build.lib.view.proto.Deps.Dependency) JavaIdeInfo(com.google.idea.blaze.base.ideinfo.JavaIdeInfo) ArtifactsDiff(com.google.idea.blaze.base.filecache.ArtifactsDiff) ProcessCanceledException(com.intellij.openapi.progress.ProcessCanceledException) Lists(com.google.common.collect.Lists) Scope(com.google.idea.blaze.base.scope.Scope) JdepsData(com.google.idea.blaze.java.sync.jdeps.JdepsState.JdepsData) Map(java.util.Map) TargetIdeInfo(com.google.idea.blaze.base.ideinfo.TargetIdeInfo) Project(com.intellij.openapi.project.Project) Logger(com.intellij.openapi.diagnostic.Logger) Nullable(javax.annotation.Nullable) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Collection(java.util.Collection) FutureUtil(com.google.idea.blaze.base.async.FutureUtil) SyncState(com.google.idea.blaze.base.model.SyncState) IOException(java.io.IOException) RemoteArtifactPrefetcher(com.google.idea.blaze.base.prefetch.RemoteArtifactPrefetcher) PrintOutput(com.google.idea.blaze.base.scope.output.PrintOutput) Maps(com.google.common.collect.Maps) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) OutputArtifact(com.google.idea.blaze.base.command.buildresult.OutputArtifact) ExecutionException(java.util.concurrent.ExecutionException) AtomicLong(java.util.concurrent.atomic.AtomicLong) Futures(com.google.common.util.concurrent.Futures) List(java.util.List) Deps(com.google.devtools.build.lib.view.proto.Deps) TimingScope(com.google.idea.blaze.base.scope.scopes.TimingScope) SyncMode(com.google.idea.blaze.base.sync.SyncMode) TargetKey(com.google.idea.blaze.base.ideinfo.TargetKey) FetchExecutor(com.google.idea.blaze.base.prefetch.FetchExecutor) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) EventType(com.google.idea.blaze.base.scope.scopes.TimingScope.EventType) InputStream(java.io.InputStream) ArtifactsDiff(com.google.idea.blaze.base.filecache.ArtifactsDiff) InputStream(java.io.InputStream) BlazeArtifact(com.google.idea.blaze.base.command.buildresult.BlazeArtifact) Dependency(com.google.devtools.build.lib.view.proto.Deps.Dependency) IOException(java.io.IOException) TargetIdeInfo(com.google.idea.blaze.base.ideinfo.TargetIdeInfo) AtomicLong(java.util.concurrent.atomic.AtomicLong) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) List(java.util.List) TargetKey(com.google.idea.blaze.base.ideinfo.TargetKey) OutputArtifact(com.google.idea.blaze.base.command.buildresult.OutputArtifact) Nullable(javax.annotation.Nullable)

Aggregations

BlazeArtifact (com.google.idea.blaze.base.command.buildresult.BlazeArtifact)18 File (java.io.File)11 Nullable (javax.annotation.Nullable)10 IOException (java.io.IOException)9 Map (java.util.Map)8 ImmutableMap (com.google.common.collect.ImmutableMap)7 LocalFileArtifact (com.google.idea.blaze.base.command.buildresult.BlazeArtifact.LocalFileArtifact)7 InputStream (java.io.InputStream)7 ImmutableMap.toImmutableMap (com.google.common.collect.ImmutableMap.toImmutableMap)6 Futures (com.google.common.util.concurrent.Futures)6 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)6 FutureUtil (com.google.idea.blaze.base.async.FutureUtil)6 OutputArtifact (com.google.idea.blaze.base.command.buildresult.OutputArtifact)6 RemoteOutputArtifact (com.google.idea.blaze.base.command.buildresult.RemoteOutputArtifact)6 ArtifactLocation (com.google.idea.blaze.base.ideinfo.ArtifactLocation)6 RemoteArtifactPrefetcher (com.google.idea.blaze.base.prefetch.RemoteArtifactPrefetcher)6 BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)6 EventType (com.google.idea.blaze.base.scope.scopes.TimingScope.EventType)6 ArtifactLocationDecoder (com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder)6 Logger (com.intellij.openapi.diagnostic.Logger)6