Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete code to fallback to the dart:html version of the app. #2713

Merged
merged 1 commit into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions packages/devtools_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,10 @@ import 'src/analytics/stub_provider.dart'
import 'src/app.dart';
import 'src/config_specific/framework_initialize/framework_initialize.dart';
import 'src/config_specific/ide_theme/ide_theme.dart';
import 'src/config_specific/load_fallback_app/load_fallback_app.dart';
import 'src/debugger/syntax_highlighter.dart';
import 'src/preferences.dart';

void main() async {
final defaultOnError = FlutterError.onError;
Copy link
Member

@kenzieschmoll kenzieschmoll Feb 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also submit a CL with this change to the internal main.dart file? That file is not updated as part of the roll.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good news is as the files it depends on were deleted you should get a compile error as part of the next roll. I can do the next roll into internal and fix as part of that.

var numErrors = 0;
var fallbackVersionDialogShown = false;

// The SKIA/CanvasKit version of Flutter Web is newer than other platforms
// and depends on WebGL so we need to detect whether it is behaving badly
// to give users the option to reopen DevTools using a fallback slower version
// that may be more stable.
// TODO(jacobr): remove this error listening code once
// https://github.com/flutter/devtools/issues/2125 is fixed.
if (const bool.fromEnvironment('FLUTTER_WEB_USE_SKIA')) {
FlutterError.onError = (FlutterErrorDetails details) {
if (defaultOnError != null) {
defaultOnError(details);
}
final bool overflowError = details.toString().contains('overflowed');

if (overflowError) {
// Overflow errors do not indicate a CanvasKit specific problem and
// occur frequently in debug builds of apps so we filter them out to
// avoid distraction. We could alternately suppress this code completely
// in debug builds but it is risky to add code that runs in release
// builds but not debug builds.
return;
}
// TODO(jacobr): detect SKIA specific errors and warn on the first SKIA
// specific error rather than waiting for multiple errors.
numErrors++;
if (numErrors >= 20 && !fallbackVersionDialogShown) {
fallbackVersionDialogShown = true;
promptToLoadFallbackApp(
"The Flutter web backend ('CanvasKit') has encountered multiple errors.\n"
'Would you like to open a fallback version of DevTools that is '
'slower but does not depend on WebGL?',
);
}
};
}

final ideTheme = getIdeTheme();

final preferences = PreferencesController();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.