Skip to content

Commit

Permalink
Remove the orphaned AppleDylibBinary and AppleLoadableBundleBinary pr…
Browse files Browse the repository at this point in the history
…oviders.

At one time, these were part of the implementation of the apple_binary rule, but the rules_apple equivalent no longer relies on these.

PiperOrigin-RevId: 443132305
  • Loading branch information
Googler authored and copybara-github committed Apr 20, 2022
1 parent 6fcbecb commit 092884b
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 292 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ public Provider getAppleDynamicFrameworkConstructor() {
return AppleDynamicFrameworkInfo.STARLARK_CONSTRUCTOR;
}

@Override
public Provider getAppleDylibBinaryConstructor() {
return AppleDylibBinaryInfo.STARLARK_CONSTRUCTOR;
}

@Override
public Provider getAppleExecutableBinaryConstructor() {
return AppleExecutableBinaryInfo.STARLARK_CONSTRUCTOR;
Expand All @@ -164,11 +159,6 @@ public Provider getAppleDebugOutputsConstructor() {
return AppleDebugOutputsInfo.STARLARK_CONSTRUCTOR;
}

@Override
public Provider getAppleLoadableBundleBinaryConstructor() {
return AppleLoadableBundleBinaryInfo.STARLARK_CONSTRUCTOR;
}

@Override
public ImmutableMap<String, String> getAppleHostSystemEnv(XcodeConfigInfo xcodeConfig) {
return AppleConfiguration.getXcodeVersionEnv(xcodeConfig.getXcodeVersion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,6 @@ public interface AppleCommonApi<
structField = true)
ProviderApi getAppleDynamicFrameworkConstructor();

@StarlarkMethod(
name = "AppleDylibBinary",
doc =
"The constructor/key for the <code>AppleDylibBinary</code> provider.<p>If a target"
+ " propagates the <code>AppleDylibBinary</code> provider, use this as the key with"
+ " which to retrieve it. Example:<br><pre class='language-python'>\n"
+ "dep = ctx.attr.deps[0]\n"
+ "p = dep[apple_common.AppleDylibBinary]\n"
+ "</pre>",
structField = true)
ProviderApi getAppleDylibBinaryConstructor();

@StarlarkMethod(
name = "AppleExecutableBinary",
doc =
Expand Down Expand Up @@ -192,19 +180,6 @@ public interface AppleCommonApi<
structField = true)
ProviderApi getAppleDebugOutputsConstructor();

@StarlarkMethod(
name = "AppleLoadableBundleBinary",
doc =
"The constructor/key for the <code>AppleLoadableBundleBinary</code> provider.<p>"
+ "If a target propagates the <code>AppleLoadableBundleBinary</code> provider, "
+ "use this as the key with which to retrieve it. Example:<br>"
+ "<pre class='language-python'>\n"
+ "dep = ctx.attr.deps[0]\n"
+ "p = dep[apple_common.AppleLoadableBundleBinary]\n"
+ "</pre>",
structField = true)
ProviderApi getAppleLoadableBundleBinaryConstructor();

@StarlarkMethod(
name = "apple_host_system_env",
doc =
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import com.google.devtools.build.lib.testutil.Scratch;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.starlark.java.eval.Dict;
Expand Down Expand Up @@ -382,7 +381,6 @@ protected String linkmapPath(String arch) throws Exception {
}

@Test
@SuppressWarnings("unchecked")
public void testProvider_executable() throws Exception {
scratch.file("examples/rule/BUILD");
scratch.file(
Expand All @@ -394,7 +392,6 @@ public void testProvider_executable() throws Exception {
" return MyInfo(",
" binary = provider.binary,",
" objc = provider.objc,",
" dep_dir = dir(dep),",
" )",
"test_rule = rule(implementation = _test_rule_impl,",
" attrs = {",
Expand Down Expand Up @@ -427,10 +424,6 @@ public void testProvider_executable() throws Exception {

assertThat(myInfo.getValue("binary")).isInstanceOf(Artifact.class);
assertThat(myInfo.getValue("objc")).isInstanceOf(ObjcProvider.class);

List<String> depProviders = (List<String>) myInfo.getValue("dep_dir");
assertThat(depProviders).doesNotContain("AppleDylibBinary");
assertThat(depProviders).doesNotContain("AppleLoadableBundleBinary");
}

@Test
Expand Down

0 comments on commit 092884b

Please sign in to comment.