@pepicrft Thank you for the feedback! Addressed in https://github.com/tuist/tuist/pull/10771/changes/ed3408af70e546a878eb3bba9fa7bda73880800f.
Hive
fix(cli): ignore embeddable watch apps in redundant dependency inspection
GitHub issue · Closed
This fixes a false positive in tuist inspect dependencies --only redundant for modern watchOS apps represented as watchOS .app targets.
An iOS app target can intentionally depend on an embeddable watch application so the generated project includes the watch embed relationship. The redundant dependency linter already ignored extension-like products and legacy .watch2App dependencies, but it still reported modern embeddable watch apps as redundant. This change reuses Target.isEmbeddableWatchApplication() so inspection matches the generator’s watch app embedding semantics.
One existing reproduction is examples/xcode/generated_ios_app_with_watch_application, where App depends on WatchApp and WatchApp is declared as:
.target(
name: "WatchApp",
destinations: [.appleWatch],
product: .app,
...
)
On current main, this command fails:
$ tuist inspect dependencies --path examples/xcode/generated_ios_app_with_watch_application --only redundant
The following redundant dependencies were found:
- App redundantly depends on: FrameworkA, WatchApp
- WatchApp redundantly depends on: FrameworkA
- WatchWidgetExtension redundantly depends on: FrameworkA
The FrameworkA entries are separate findings from that example. The false positive fixed here is App redundantly depends on: WatchApp, because that dependency is required for embedding the watch application.
How to test locally
Run TuistUnitTests.