MobileNativeFoundation / rules_xcodeproj

Bazel rules for generating Xcode projects.
MIT License
526 stars 86 forks source link

Feature Request: Analyze in Xcode only runs against uppermost subset of targets #3089

Open aaronsky opened 1 month ago

aaronsky commented 1 month ago

Let me know if this is an inaccurate read of what is happening. From what I can see, when running Analyze against a target in Xcode (BwB, Bazel 7.3.1, rules_xcodeproj 2.7, rules_apple 3.8, rules_swift 2.1.1), the analyzer is only run against the source-list of the topmost library target in a top-level target. For example, the library of an ios_application, ios_unit_test, or ios_build_test. Sources in dependencies of that library target are not analyzed, and the analyzer doesn't appear to have much of an effect regardless.

Before I go through the process of sanitizing logs for y'all, does this sound familiar? Has the analyzer ever received attention in the ruleset? I would totally believe it if it had not yet.

brentleyjones commented 1 month ago

It hasn't received any attention. I expect the issue is that target dependencies aren't represented in Xcode (as a performance optimization to prevent the compiler stubs from being run constantly). you could try to adjust _collect_dependencies to not filter out any dependencies to see if that fixes it for you.