Skip to content

Remove dead objc setup code#12073

Closed
keith wants to merge 9 commits intobazelbuild:masterfrom
keith:ks/remove-dead-objc-setup-code
Closed

Remove dead objc setup code#12073
keith wants to merge 9 commits intobazelbuild:masterfrom
keith:ks/remove-dead-objc-setup-code

Conversation

@keith
Copy link
Copy Markdown
Member

@keith keith commented Sep 9, 2020

This appears to be unused

@keith
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

trybka commented Sep 9, 2020

+cc @googlewalt as an FYI

Comment thread tools/objc/gcov_stub
@@ -1,7 +0,0 @@
#!/bin/bash
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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