use of com.jetbrains.cidr.lang.workspace.OCResolveConfiguration in project intellij by bazelbuild.
the class BlazeConfigurationResolverTest method afterQueryingConfiguration_newTarget_testIncrementalUpdatePartlyReused.
@Test
public void afterQueryingConfiguration_newTarget_testIncrementalUpdatePartlyReused() {
ProjectView projectView = projectView(directories("foo/bar"), targets("//foo/bar:*"));
TargetMapBuilder targetMapBuilder = TargetMapBuilder.builder().addTarget(createCcToolchain()).addTarget(createCcTarget("//foo/bar:binary", Kind.CC_BINARY, ImmutableList.of(src("foo/bar/binary.cc"))));
assertThatResolving(projectView, targetMapBuilder.build()).producesConfigurationsFor("//foo/bar:binary");
Collection<BlazeResolveConfiguration> initialConfigurations = resolverResult.getAllConfigurations();
// Make sure that if we *query* the configuration in some way, it doesn't affect its
// compatibility / reusability. There may be caches attached to the configuration and those
// should not be compared when checking equivalence.
OCResolveConfiguration firstConfiguration = initialConfigurations.iterator().next();
firstConfiguration.getLibraryHeadersRoots(new OCResolveRootAndConfiguration(firstConfiguration, OCLanguageKind.CPP));
targetMapBuilder.addTarget(createCcTarget("//foo/bar:library", Kind.CC_LIBRARY, ImmutableList.of(src("foo/bar/library.cc")), ImmutableList.of("OTHER=1")));
assertThatResolving(projectView, targetMapBuilder.build()).reusedConfigurations(initialConfigurations, "//foo/bar:library");
}
Aggregations