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

Confused about TargetCountProvider #42

Open
joeboyscout04 opened this issue Jun 7, 2020 · 4 comments
Open

Confused about TargetCountProvider #42

joeboyscout04 opened this issue Jun 7, 2020 · 4 comments

Comments

@joeboyscout04
Copy link
Contributor

Hey there, thanks for the great library! I've just started using it in our project but I'm a bit confused about the TargetCountProvider. I'm not exactly sure what it's counting...it seems to be dependencies, but in my project I get the count==30, but we have many (many) more which are pulled in via Cocoapods. When looking at the Frameworks folder in our IPA bundle, we have 84 frameworks (70 when you exclude the libswift ones) included.

Our project is mixed Swift/ObjC, we have some internal frameworks which are incorporated into the main project. New build system, Xcode 11.

Can you clarify a bit what TargetCountProvider is attempting to do and why it might be generating a different number than what I would expect?

Thanks!

@rockbruno
Copy link
Owner

Hi there! It picks up the number of modules in your target, so anything where you have to do import .... I think it doesn't recognize static frameworks that are bundled inside your app (frameworks usable without the import keyword -- I forgot the proper name for them). Is this your case? I haven't considered this possibility before.

@rogerluan
Copy link
Contributor

@joeboyscout04 are you using static frameworks?

@rockbruno I'm also confused by your definition. Our project points out 7 dependencies, but we're easily importing over 40 dependencies (from Pods) as well as many from native libs (e.g. AVFoundation) 🤔

@rockbruno
Copy link
Owner

I see. Are these pods dependencies pre-compiled? I think it only catches things that your compile since this provider works by searching for --module-name compilations

@rogerluan
Copy link
Contributor

They're mostly precompiled, yes! We use https://github.com/leavez/cocoapods-binary, which precompiles all pods upon installing them.

If we exclude all the precompiled ones (which probably include the native ones - right?), I think the count is correct 👍 Sounds like this opens an opportunity for a future improvement (such as counting how how many static libs and/or precompiled libs we're using). Maybe it's worth rephrasing the docs of the current Target Counter while there's no "generic" dependency counter?

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

No branches or pull requests

3 participants