diff --git a/src/com/facebook/buck/parser/DaemonicParserState.java b/src/com/facebook/buck/parser/DaemonicParserState.java index 3cb26708a9c..57acec398c0 100644 --- a/src/com/facebook/buck/parser/DaemonicParserState.java +++ b/src/com/facebook/buck/parser/DaemonicParserState.java @@ -382,7 +382,7 @@ LoadingCache getBuildFileTrees() { * types with generics. Care should be taken to ensure that the correct class object is passed in. */ @SuppressWarnings("unchecked") - public PipelineNodeCache.Cache getOrCreateNodeCache(Class cacheType) { + public PipelineNodeCache.Cache getOrCreateNodeCache(Class cacheType) { try { return (PipelineNodeCache.Cache) typedNodeCaches.get(cacheType); } catch (ExecutionException e) { diff --git a/src/com/facebook/buck/parser/PerBuildStateFactoryWithConfigurableAttributes.java b/src/com/facebook/buck/parser/PerBuildStateFactoryWithConfigurableAttributes.java index 22472a98a33..3ae6b26f585 100644 --- a/src/com/facebook/buck/parser/PerBuildStateFactoryWithConfigurableAttributes.java +++ b/src/com/facebook/buck/parser/PerBuildStateFactoryWithConfigurableAttributes.java @@ -18,6 +18,7 @@ import com.facebook.buck.core.cell.Cell; import com.facebook.buck.core.config.BuckConfig; +import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.impl.MultiPlatformTargetConfigurationTransformer; import com.facebook.buck.core.model.targetgraph.TargetNode; import com.facebook.buck.core.model.targetgraph.impl.TargetNodeFactory; @@ -200,9 +201,14 @@ protected PerBuildState create( MoreExecutors.listeningDecorator( createExecutorService(rootCell.getBuckConfig(), "configured-pipeline")); + @SuppressWarnings("unchecked") + PipelineNodeCache.Cache> nodeCache = + daemonicParserState.getOrCreateNodeCache( + (Class>) (Class) TargetNode.class); + ParsePipeline> targetNodeParsePipeline = new RawTargetNodeToTargetNodeParsePipeline( - daemonicParserState.getOrCreateNodeCache(TargetNode.class), + nodeCache, configuredPipelineExecutor, rawTargetNodePipeline, eventBus,