Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead objc setup code #12073

Closed
wants to merge 9 commits into from

Conversation

keith
Copy link
Member

@keith keith commented Sep 9, 2020

This appears to be unused

@keith
Copy link
Member Author

keith commented Sep 9, 2020

@trybka continuing from #12046 (comment)

if no one references LIBTOOL_ATTRIBUTE does that mean this is unreferenced entirely? I assumed that the registration of the LibtoolRule might mean it could be used implicitly somehow?

@trybka
Copy link
Contributor

trybka commented Sep 9, 2020

Good find on LibtoolRule. My read of this is that any caller which would want to invoke this libtool would need to grab it via the attribute (or calling the getter), and since I can't find those references, I think the whole mess is unused? Curious how far on the thread this can be pulled out.

@keith
Copy link
Member Author

keith commented Sep 9, 2020

I will push a second commit with that assumption after I validate I can build our app without that attribute

@keith
Copy link
Member Author

keith commented Sep 9, 2020

if all it was doing was adding that implicit attribute, I would assume that someone would have to reference $libtool (even if not with the constant) to use it? similar to

} else if (ruleContext.isAttrDefined("$lcov_merger", LABEL)) {
lcovMergerAttr = "$lcov_merger";

or

Artifact pruner = ruleContext.getPrerequisiteArtifact("$j2objc_dead_code_pruner");

@trybka
Copy link
Contributor

trybka commented Sep 9, 2020

if all it was doing was adding that implicit attribute, I would assume that someone would have to reference $libtool (even if not with the constant) to use it?

That's my understanding, yes.

@trybka
Copy link
Contributor

trybka commented Sep 9, 2020

+cc @googlewalt as an FYI

@@ -1,7 +0,0 @@
#!/bin/bash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@trybka trybka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the apple_sdk flag back for now, there are more references to it internally, and we'd need to clean them up.

You can probably still remove the getters and whatnot

@keith
Copy link
Member Author

keith commented Sep 10, 2020

added that flag back

@bazel-io bazel-io closed this in f8b51ff Sep 11, 2020
@keith keith deleted the ks/remove-dead-objc-setup-code branch September 11, 2020 15:30
@keith
Copy link
Member Author

keith commented Sep 11, 2020

Thanks a ton!~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants