diff options
author | 2017-07-17 13:34:06 +0200 | |
---|---|---|
committer | 2017-07-17 13:43:49 +0200 | |
commit | 88518522a18df5788736be6151fc67992efe2aad (patch) | |
tree | 5ec29bbc8620a9b1f461a0bf90ae9f975c0c186c /src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java | |
parent | 01ddfb7bf418b371859de62f4eab2f41ea9a4a4a (diff) |
Automated rollback of commit 4594b7fd6c2516341cdd6e57f9eaaf22cf691f95.
*** Reason for rollback ***
It breaks examples/tutorial on ci.bazel.build [1] with error:
object of type 'Target' has no field 'objc'.
[1] http://ci.bazel.io/view/Dashboard/job/Tutorial/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/1023/console
*** Original change description ***
AppleBinary and AppleStaticLibrary no longer propagate unwrapped ObjcProvider.
This will prevent dependencies on apple_binary and apple_static_library from objc_library and other lower-level rules.
RELNOTES: None.
PiperOrigin-RevId: 162195726
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java index 4a87049350..a2689cd8fc 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java @@ -679,12 +679,12 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { @Test public void testModulemapCreatedForNonLinkingTargets() throws Exception { - checkOnlyLibModuleMapsArePresentForTarget("//package:opl_protobuf", false); + checkOnlyLibModuleMapsArePresentForTarget("//package:opl_protobuf"); } @Test public void testModulemapNotCreatedForLinkingTargets() throws Exception { - checkOnlyLibModuleMapsArePresentForTarget("//package:opl_binary", true); + checkOnlyLibModuleMapsArePresentForTarget("//package:opl_binary"); } @Test @@ -760,8 +760,7 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { return Joiner.on('\n').join(Ordering.natural().immutableSortedCopy(elements)); } - private void checkOnlyLibModuleMapsArePresentForTarget(String target, - boolean fromBinary) throws Exception { + private void checkOnlyLibModuleMapsArePresentForTarget(String target) throws Exception { Artifact libModuleMap = getGenfilesArtifact( "opl_protobuf.modulemaps/module.modulemap", @@ -771,11 +770,7 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { "protobuf_lib.modulemaps/module.modulemap", getConfiguredTarget("//objcproto:protobuf_lib")); - ObjcProvider provider = fromBinary - ? getConfiguredTarget(target) - .get(AppleExecutableBinaryProvider.SKYLARK_CONSTRUCTOR) - .getDepsObjcProvider() - : providerForTarget(target); + ObjcProvider provider = providerForTarget(target); assertThat(Artifact.toRootRelativePaths(provider.get(ObjcProvider.MODULE_MAP).toSet())) .containsExactlyElementsIn( Artifact.toRootRelativePaths(ImmutableSet.of(libModuleMap, protolibModuleMap))); |