Skip to content

Commit

Permalink
[flutter_releases] Flutter beta 2.13.0-0.3.pre Framework Cherrypicks (#…
Browse files Browse the repository at this point in the history
…102620)

* Handle CocoaPods ffi stderr (#102327)

* Hide unresolved DartUri log messages (#102338)

* 'Create candidate branch version flutter-2.13-candidate.0 for beta'

* 'Update Engine revision to 3096903c8923608d3c1ccf8058a29c31a2bfbc53 for beta release 2.13.0-0.3.pre'

* Update release-candidate-branch.version

* Update packages/flutter_tools/lib/src/macos/cocoapods.dart

* Remove skipped test from CP issue

Co-authored-by: Jenn Magder <magder@google.com>
Co-authored-by: Elliott Brooks (she/her) <21270878+elliette@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 27, 2022
1 parent 8662e22 commit 5293f3c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/internal/engine.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24a02fa5ee681840cdc842c22f4cb4bdd5ec3115
3096903c8923608d3c1ccf8058a29c31a2bfbc53
10 changes: 10 additions & 0 deletions packages/flutter_tools/lib/src/isolated/devfs_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,16 @@ void _log(logging.LogRecord event) {
if (event.level >= logging.Level.SEVERE) {
globals.printError('${event.loggerName}: ${event.message}$error', stackTrace: event.stackTrace);
} else if (event.level == logging.Level.WARNING) {
// TODO(elliette): Remove the following message suppressions after DWDS is
// >13.1.0, https://github.com/flutter/flutter/issues/101639
const String dartUri = 'DartUri';
if (event.loggerName == dartUri) {
const String webSqlWarning = 'Unresolved uri: dart:web_sql';
const String uiWarning = 'Unresolved uri: dart:ui';
if (event.message == webSqlWarning || event.message == uiWarning) {
return;
}
}
globals.printWarning('${event.loggerName}: ${event.message}$error');
} else {
globals.printTrace('${event.loggerName}: ${event.message}$error');
Expand Down
7 changes: 4 additions & 3 deletions packages/flutter_tools/lib/src/macos/cocoapods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,19 @@ class CocoaPods {
}

void _diagnosePodInstallFailure(ProcessResult result) {
if (result.stdout is! String) {
final Object? stdout = result.stdout;
final Object? stderr = result.stderr;
if (stdout is! String || stderr is! String) {
return;
}
final String stdout = result.stdout as String;
if (stdout.contains('out-of-date source repos')) {
_logger.printError(
"Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.\n"
'To update the CocoaPods specs, run:\n'
' pod repo update\n',
emphasis: true,
);
} else if (stdout.contains('ffi_c.bundle') && stdout.contains('LoadError') &&
} else if ((stderr.contains('ffi_c.bundle') || stderr.contains('/ffi/')) &&
_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) {
// https://github.com/flutter/flutter/issues/70796
UsageEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
'LANG': 'en_US.UTF-8',
},
exitCode: 1,
stdout: cocoaPodsError,
stderr: cocoaPodsError,
),
const FakeCommand(
command: <String>['which', 'sysctl'],
Expand Down
14 changes: 14 additions & 0 deletions packages/flutter_tools/test/web.shard/output_web_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,18 @@ void main() {
await sendEvent(<String, Object>{'type': 'DevtoolsEvent'});
await warning;
});

testWithoutContext(
'flutter run output skips DartUri warning messages from dwds', () async {
bool containsDartUriWarning = false;
flutter.stderr.listen((String msg) {
if (msg.contains('DartUri')) {
containsDartUriWarning = true;
}
});
await start();
await flutter.stop();
expect(containsDartUriWarning, isFalse);
// TODO(elliette): Enable for DWDS >13.1.0, https://github.com/flutter/flutter/issues/101639
}, skip: true); // [intended] enable for DWDS >13.1.0
}

0 comments on commit 5293f3c

Please sign in to comment.