Hive Hive
Sign in

fix(cli): ignore embeddable watch apps in redundant dependency inspection

GitHub issue · Closed

Metadata
Source
tuist/tuist #10771
Updated
Jun 24, 2026
Domains
CLI
Details

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.

Comments
P
pepicrft May 19, 2026

Thanks @shgew. Let’s merge once CI is green.

S
shgew May 19, 2026

@pepicrft looks like something went wrong on CI, but I can’t understand if it’s my changes or just something’s flaky. Can you please advise if I should fix anything?

P
pepicrft May 21, 2026

@pepicrft looks like something went wrong on CI, but I can’t understand if it’s my changes or just something’s flaky. Can you please advise if I should fix anything?

It’s likely flakiness. I’m looking into it myself and I’ll report once I have it figured out.