use of org.jetbrains.jps.builders.impl.BuildRootIndexImpl in project intellij-community by JetBrains.
the class CompilerEncodingConfigurationTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
BuildTargetRegistryImpl targetRegistry = new BuildTargetRegistryImpl(myModel);
ModuleExcludeIndex index = new ModuleExcludeIndexImpl(myModel);
IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(myModel);
myDataStorageRoot = FileUtil.createTempDirectory("compile-server-" + StringUtil.decapitalize(StringUtil.trimStart(getName(), "test")), null);
BuildDataPaths dataPaths = new BuildDataPathsImpl(myDataStorageRoot);
myRootIndex = new BuildRootIndexImpl(targetRegistry, myModel, index, dataPaths, ignoredFileIndex);
}
use of org.jetbrains.jps.builders.impl.BuildRootIndexImpl in project intellij-community by JetBrains.
the class JpsBuildTestCase method createProjectDescriptor.
protected ProjectDescriptor createProjectDescriptor(final BuildLoggingManager buildLoggingManager) {
try {
BuildTargetRegistryImpl targetRegistry = new BuildTargetRegistryImpl(myModel);
ModuleExcludeIndex index = new ModuleExcludeIndexImpl(myModel);
IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(myModel);
BuildDataPaths dataPaths = new BuildDataPathsImpl(myDataStorageRoot);
BuildRootIndexImpl buildRootIndex = new BuildRootIndexImpl(targetRegistry, myModel, index, dataPaths, ignoredFileIndex);
BuildTargetIndexImpl targetIndex = new BuildTargetIndexImpl(targetRegistry, buildRootIndex);
BuildTargetsState targetsState = new BuildTargetsState(dataPaths, myModel, buildRootIndex);
ProjectTimestamps timestamps = new ProjectTimestamps(myDataStorageRoot, targetsState);
BuildDataManager dataManager = new BuildDataManager(dataPaths, targetsState, true);
return new ProjectDescriptor(myModel, new BuildFSState(true), timestamps, dataManager, buildLoggingManager, index, targetsState, targetIndex, buildRootIndex, ignoredFileIndex);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
use of org.jetbrains.jps.builders.impl.BuildRootIndexImpl in project intellij-elixir by KronicDeth.
the class JpsBuildTestCase method createProjectDescriptor.
protected ProjectDescriptor createProjectDescriptor(BuildLoggingManager buildLoggingManager) {
try {
BuildTargetRegistryImpl targetRegistry = new BuildTargetRegistryImpl(myModel);
ModuleExcludeIndex index = new ModuleExcludeIndexImpl(myModel);
IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(myModel);
BuildDataPaths dataPaths = new BuildDataPathsImpl(myDataStorageRoot);
BuildRootIndexImpl buildRootIndex = new BuildRootIndexImpl(targetRegistry, myModel, index, dataPaths, ignoredFileIndex);
BuildTargetIndexImpl targetIndex = new BuildTargetIndexImpl(targetRegistry, buildRootIndex);
BuildTargetsState targetsState = new BuildTargetsState(dataPaths, myModel, buildRootIndex);
ProjectTimestamps timestamps = new ProjectTimestamps(myDataStorageRoot, targetsState);
BuildDataManager dataManager = new BuildDataManager(dataPaths, targetsState, true);
return new ProjectDescriptor(myModel, new BuildFSState(true), timestamps, dataManager, buildLoggingManager, index, targetsState, targetIndex, buildRootIndex, ignoredFileIndex);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
use of org.jetbrains.jps.builders.impl.BuildRootIndexImpl in project intellij-community by JetBrains.
the class BuildRunner method load.
public ProjectDescriptor load(MessageHandler msgHandler, File dataStorageRoot, BuildFSState fsState) throws IOException {
final JpsModel jpsModel = myModelLoader.loadModel();
BuildDataPaths dataPaths = new BuildDataPathsImpl(dataStorageRoot);
BuildTargetRegistryImpl targetRegistry = new BuildTargetRegistryImpl(jpsModel);
ModuleExcludeIndex index = new ModuleExcludeIndexImpl(jpsModel);
IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(jpsModel);
BuildRootIndexImpl buildRootIndex = new BuildRootIndexImpl(targetRegistry, jpsModel, index, dataPaths, ignoredFileIndex);
BuildTargetIndexImpl targetIndex = new BuildTargetIndexImpl(targetRegistry, buildRootIndex);
BuildTargetsState targetsState = new BuildTargetsState(dataPaths, jpsModel, buildRootIndex);
ProjectTimestamps projectTimestamps = null;
BuildDataManager dataManager = null;
try {
projectTimestamps = new ProjectTimestamps(dataStorageRoot, targetsState);
dataManager = new BuildDataManager(dataPaths, targetsState, STORE_TEMP_CACHES_IN_MEMORY);
if (dataManager.versionDiffers()) {
myForceCleanCaches = true;
msgHandler.processMessage(new CompilerMessage("build", BuildMessage.Kind.INFO, "Dependency data format has changed, project rebuild required"));
}
} catch (Exception e) {
// second try
LOG.info(e);
if (projectTimestamps != null) {
projectTimestamps.close();
}
if (dataManager != null) {
dataManager.close();
}
myForceCleanCaches = true;
FileUtil.delete(dataStorageRoot);
targetsState = new BuildTargetsState(dataPaths, jpsModel, buildRootIndex);
projectTimestamps = new ProjectTimestamps(dataStorageRoot, targetsState);
dataManager = new BuildDataManager(dataPaths, targetsState, STORE_TEMP_CACHES_IN_MEMORY);
// second attempt succeeded
msgHandler.processMessage(new CompilerMessage("build", BuildMessage.Kind.INFO, "Project rebuild forced: " + e.getMessage()));
}
return new ProjectDescriptor(jpsModel, fsState, projectTimestamps, dataManager, BuildLoggingManager.DEFAULT, index, targetsState, targetIndex, buildRootIndex, ignoredFileIndex);
}
Aggregations