1919
2020import com .google .common .collect .Iterables ;
2121import com .google .common .eventbus .EventBus ;
22- import com .google .devtools .build .lib .analysis .AnalysisProtos ;
22+ import com .google .devtools .build .lib .analysis .AnalysisProtosV2 ;
2323import com .google .devtools .build .lib .analysis .config .TransitionFactories ;
2424import com .google .devtools .build .lib .analysis .util .MockRule ;
2525import com .google .devtools .build .lib .events .Event ;
@@ -91,7 +91,7 @@ public void testSelectInAttribute() throws Exception {
9191 " values = {'foo': 'cat'}" ,
9292 ")" );
9393
94- AnalysisProtos .ConfiguredTarget myRuleProto =
94+ AnalysisProtosV2 .ConfiguredTarget myRuleProto =
9595 (Iterables .getOnlyElement (getOutput ("//test:my_rule" ).getResultsList ()));
9696 List <Build .Attribute > attributes = myRuleProto .getTarget ().getRule ().getAttributeList ();
9797 for (Build .Attribute attribute : attributes ) {
@@ -141,19 +141,19 @@ public void testConfigurationHash() throws Exception {
141141 "simple_rule(name = 'dep')" );
142142
143143 // Assert checksum from proto is proper checksum.
144- AnalysisProtos .ConfiguredTarget myRuleProto =
144+ AnalysisProtosV2 .ConfiguredTarget myRuleProto =
145145 Iterables .getOnlyElement (getOutput ("//test:my_rule" ).getResultsList ());
146146 KeyedConfiguredTarget myRule = Iterables .getOnlyElement (eval ("//test:my_rule" ));
147147
148148 assertThat (myRuleProto .getConfiguration ().getChecksum ())
149149 .isEqualTo (myRule .getConfigurationChecksum ());
150150
151151 // Assert checksum for two configured targets in proto are not the same.
152- List <AnalysisProtos .ConfiguredTarget > protoDeps =
152+ List <AnalysisProtosV2 .ConfiguredTarget > protoDeps =
153153 getOutput ("deps(//test:my_rule)" ).getResultsList ();
154154 assertThat (protoDeps ).hasSize (2 );
155155
156- Iterator <AnalysisProtos .ConfiguredTarget > protoDepsIterator = protoDeps .iterator ();
156+ Iterator <AnalysisProtosV2 .ConfiguredTarget > protoDepsIterator = protoDeps .iterator ();
157157 assertThat (protoDepsIterator .next ().getConfiguration ().getChecksum ())
158158 .isNotEqualTo (protoDepsIterator .next ().getConfiguration ().getChecksum ());
159159 }
@@ -166,7 +166,7 @@ public void testAlias() throws Exception {
166166 "simple_rule(name = 'my_rule')" ,
167167 "alias(name = 'my_alias', actual = ':my_rule')" );
168168
169- AnalysisProtos .ConfiguredTarget alias =
169+ AnalysisProtosV2 .ConfiguredTarget alias =
170170 Iterables .getOnlyElement (getOutput ("//test:my_alias" ).getResultsList ());
171171
172172 assertThat (alias .getTarget ().getRule ().getName ()).isEqualTo ("//test:my_alias" );
@@ -196,7 +196,7 @@ public void testAlias_withSelect() throws Exception {
196196 getHelper ().useConfiguration ("--foo=woof" );
197197 helper .setQuerySettings (Setting .NO_IMPLICIT_DEPS );
198198
199- List <AnalysisProtos .ConfiguredTarget > myAliasRuleProto =
199+ List <AnalysisProtosV2 .ConfiguredTarget > myAliasRuleProto =
200200 getOutput ("deps(//test:my_alias_rule)" ).getResultsList ();
201201
202202 List <String > depNames = new ArrayList <>(myAliasRuleProto .size ());
@@ -210,7 +210,7 @@ private MockRule getSimpleRule() {
210210 return () -> MockRule .define ("simple_rule" );
211211 }
212212
213- private AnalysisProtos .CqueryResult getOutput (String queryExpression ) throws Exception {
213+ private AnalysisProtosV2 .CqueryResult getOutput (String queryExpression ) throws Exception {
214214 QueryExpression expression = QueryParser .parse (queryExpression , getDefaultFunctions ());
215215 Set <String > targetPatternSet = new LinkedHashSet <>();
216216 expression .collectTargetPatterns (targetPatternSet );
0 commit comments