Skip to content

Commit 8e2278b

Browse files
authored
Revert "Reduce noise in xcodebuild stdout (flutter#14586)" (flutter#14605)
This reverts commit 74ddda5.
1 parent e11e442 commit 8e2278b

File tree

2 files changed

+13
-40
lines changed

2 files changed

+13
-40
lines changed

packages/flutter_tools/bin/xcode_backend.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
# found in the LICENSE file.
55

66
RunCommand() {
7-
if [[ -n "$VERBOSE_SCRIPT_LOGGING" ]]; then
8-
echo "$*"
9-
fi
7+
echo "$*"
108
"$@"
119
return $?
1210
}

packages/flutter_tools/lib/src/ios/mac.dart

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -277,40 +277,16 @@ Future<XcodeBuildResult> buildXcodeProject({
277277
);
278278
}
279279

280-
final Status cleanStatus =
281-
logger.startProgress('Running Xcode clean...', expectSlowOperation: true);
282-
final RunResult cleanResult = await runAsync(
283-
<String>[
284-
'/usr/bin/env',
285-
'xcrun',
286-
'xcodebuild',
287-
'clean',
288-
],
289-
workingDirectory: app.appDirectory,
290-
);
291-
cleanStatus.stop();
292-
if (cleanResult.exitCode != 0) {
293-
throwToolExit('Xcode failed to clean\n${cleanResult.stderr}');
294-
}
295-
296280
final List<String> commands = <String>[
297281
'/usr/bin/env',
298282
'xcrun',
299283
'xcodebuild',
284+
'clean',
300285
'build',
301286
'-configuration', configuration,
302287
'ONLY_ACTIVE_ARCH=YES',
303288
];
304289

305-
if (logger.isVerbose) {
306-
// An environment variable to be passed to xcode_backend.sh determining
307-
// whether to echo back executed commands.
308-
commands.add('VERBOSE_SCRIPT_LOGGING=YES');
309-
} else {
310-
// This will print warnings and errors only.
311-
commands.add('-quiet');
312-
}
313-
314290
if (developmentTeam != null)
315291
commands.add('DEVELOPMENT_TEAM=$developmentTeam');
316292

@@ -342,28 +318,27 @@ Future<XcodeBuildResult> buildXcodeProject({
342318
);
343319
}
344320

345-
final Status buildStatus =
346-
logger.startProgress('Running Xcode build...', expectSlowOperation: true);
347-
final RunResult buildResult = await runAsync(
321+
final Status status = logger.startProgress('Running Xcode build...', expectSlowOperation: true);
322+
final RunResult result = await runAsync(
348323
commands,
349324
workingDirectory: app.appDirectory,
350325
allowReentrantFlutter: true
351326
);
352-
buildStatus.stop();
353-
if (buildResult.exitCode != 0) {
327+
status.stop();
328+
if (result.exitCode != 0) {
354329
printStatus('Failed to build iOS app');
355-
if (buildResult.stderr.isNotEmpty) {
330+
if (result.stderr.isNotEmpty) {
356331
printStatus('Error output from Xcode build:\n↳');
357-
printStatus(buildResult.stderr, indent: 4);
332+
printStatus(result.stderr, indent: 4);
358333
}
359-
if (buildResult.stdout.isNotEmpty) {
334+
if (result.stdout.isNotEmpty) {
360335
printStatus('Xcode\'s output:\n↳');
361-
printStatus(buildResult.stdout, indent: 4);
336+
printStatus(result.stdout, indent: 4);
362337
}
363338
return new XcodeBuildResult(
364339
success: false,
365-
stdout: buildResult.stdout,
366-
stderr: buildResult.stderr,
340+
stdout: result.stdout,
341+
stderr: result.stderr,
367342
xcodeBuildExecution: new XcodeBuildExecution(
368343
commands,
369344
app.appDirectory,
@@ -373,7 +348,7 @@ Future<XcodeBuildResult> buildXcodeProject({
373348
} else {
374349
// Look for 'clean build/<configuration>-<sdk>/Runner.app'.
375350
final RegExp regexp = new RegExp(r' clean (.*\.app)$', multiLine: true);
376-
final Match match = regexp.firstMatch(buildResult.stdout);
351+
final Match match = regexp.firstMatch(result.stdout);
377352
String outputDir;
378353
if (match != null) {
379354
final String actualOutputDir = match.group(1).replaceAll('\\ ', ' ');

0 commit comments

Comments
 (0)