Skip to content

[hooks] Xcode circular dependencies with hooks #185738

Description

@dcharkes

When building a project for the second time with data assets, I get xcode to complain about circular dependencies:

dacoharkes-mac:idle_pirate dacoharkes$ flutter clean && flutter run -d macos
[...]
Running pod install...                                             696ms
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
Building macOS application...                                           
✓ Built build/macos/Build/Products/Debug/idle_pirate.app
2026-04-29 12:20:13.983 idle_pirate[65851:67591285] Running with merged UI and platform thread. Experimental.
Syncing files to device macOS...                                    39ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
[...]
Lost connection to device.

dacoharkes-mac:idle_pirate dacoharkes$  flutter run -d macos
[...]
Launching lib/main.dart on macOS in debug mode...
error: Cycle inside Flutter Assemble; building could produce unreliable results. This usually can be resolved by moving the shell script phase 'Run Script' so that it runs before the build phase that depends on its outputs.
Cycle details:
→ That command depends on command in Target 'Flutter Assemble': script phase “Run Script”
○ That command depends on command in Target 'Flutter Assemble': script phase “Run Script”


Raw dependency cycle trace:

target:  ->

node: <all> ->

command: <all> ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->

command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14-:Debug:ExtractAppIntentsMetadata ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/arm64/MainFlutterWindow.swiftconstvalues ->

command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14-:Debug:SwiftDriver Compilation Runner normal arm64 com.apple.xcode.tools.swift.compiler ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/DerivedSources/GeneratedAssetSymbols.swift ->

command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14-:Debug:GenerateAssetSymbols /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/macos/Runner/Assets.xcassets ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--fused-phase0--cp--check-pods-manifest-lock> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--fused-phase0--cp--check-pods-manifest-lock ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--ModuleVerifierTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--ModuleVerifierTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--RealityAssetsTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--RealityAssetsTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--HeadermapTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--HeadermapTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--GenerateAppPlaygroundAssetCatalogTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--GenerateAppPlaygroundAssetCatalogTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--GeneratedFilesTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--GeneratedFilesTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--ProductStructureTaskProducer> ->

command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--ProductStructureTaskProducer ->

node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--begin-compiling> ->

command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14-:Debug:Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e02a26d6e580d3222b86d62fb80ec380c14--begin-compiling ->

node: <target-Flutter Assemble-18c1723432283e0cc55f10a6dcfd9e02339362e37688461f7f8b651800569a9a--modules-ready> ->

command: P0:target-Flutter Assemble-18c1723432283e0cc55f10a6dcfd9e02339362e37688461f7f8b651800569a9a-:Debug:Gate target-Flutter Assemble-18c1723432283e0cc55f10a6dcfd9e02339362e37688461f7f8b651800569a9a--modules-ready ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/assets/images/anchor.png ->

CYCLE POINT ->

command: P2:target-Flutter Assemble-18c1723432283e0cc55f10a6dcfd9e02339362e37688461f7f8b651800569a9a-:Debug:PhaseScriptExecution Run Script /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Flutter Assemble.build/Script-33CC111E2044C6BF0003C045.sh ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/assets/translations/ ->

directoryTreeSignature: Q ->

node: /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/assets/translations/en.json ->

command: P2:target-Flutter Assemble-18c1723432283e0cc55f10a6dcfd9e02339362e37688461f7f8b651800569a9a-:Debug:PhaseScriptExecution Run Script /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Flutter Assemble.build/Script-33CC111E2044C6BF0003C045.sh
** BUILD FAILED **

Building macOS application...                                           
Error: Build process failed
dacoharkes-mac:idle_pirate dacoharkes$ 

/Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist contains
/Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/assets/translations/en.json.

/Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/macos/Flutter/ephemeral/FlutterInputs.xcfilelist contains /Users/dacoharkes/src/dacoharkes/idle_pirate/pkgs/idle_pirate/assets/translations/en.json.

But I'd expect it to be an input not an output.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-macosBuilding on or for macOS specificallyteam-macosOwned by the macOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-macosTriaged by the macOS platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions