flutter / flutter/flutter

[ios][tool] xcode_backend logging shouldn't rely on `exitCode`

Open
#174,079 0 comments 0 reactions 0 assignees View on GitHub
P2 platform-ios team-ios tool triaged-ios
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

We have this code:

https://github.com/flutter/flutter/blob/5483fef5384821748cfcc1bfc3157e1f9c0322ea/packages/flutter_tools/bin/xcode_backend.dart#L132-L139

We check `exitCode` of current process, not `result.exitCode` of the subprocess (e.g. plutil).

I think this check shouldn't be necessary, because if exitCode is not 0, then the current process is already terminated (`xcode_backend` never change its own exitCode without exiting the process).

It should be safe to just do

```
if (!verbose) {
// ...
}
```

Contributor guide

Open the contributing guide

Research direction

Open packages/flutter_tools/bin/xcode_backend.dart around lines 132-139 and compare the current-process exitCode check with the referenced subprocess result. Remove the unnecessary exitCode-dependent logging condition so it only checks verbose, then verify the surrounding xcode_backend behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
build-system, mobile
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.