Catch filesystem exception during output of dependencies delta. When the frontend server attempts to compile dart code with an invalid import (perhaps due to a missing entry in the .packages file), it will get stuck in a bad state due to attempting to output said invalid import uri as a new dependency. Instead failures here should probably be caught and ignored, since the error messages are already reported through the existing diagnostics. See also: - https://github.com/dart-lang/sdk/issues/36481 To reproduce this case: 1. Run the flutter gallery application (device unimportant). 2. Add an import for `package:flutter_localizations/flutter_localizations.dart` in `lib/main.dart`. 3. Request hot reload. Before change: ``` Compiler message: Error: Could not resolve the package 'flutter_localizations' in 'package:flutter_localizations/flutter_localizations.dart'. lib/gallery/home.dart:12:8: Error: Not found: 'package:flutter_localizations/flutter_localizations.dart' import 'package:flutter_localizations/flutter_localizations.dart'; ^ Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aflutter_localizations%2Fflutter_localizations.dart; message=StandardFileSystem only supports file:* and data:* URIs) <asynchronous suspension> <asynchronous suspension> <asynchronous suspension> <asynchronous suspension> <asynchronous suspension> ``` It then gets stuck as from the perspective of the flutter tool the reload request never completed. After change: ``` Compiler message: Error: Could not resolve the package 'flutter_localizations' in 'package:flutter_localizations/flutter_localizations.dart'. lib/gallery/home.dart:12:8: Error: Not found: 'package:flutter_localizations/flutter_localizations.dart' import 'package:flutter_localizations/flutter_localizations.dart'; ^ Performing hot reload... Reloaded 4 of 617 libraries in 837ms. ``` Change-Id: Ibb72624c492747a9339b15cb0b064edad8ebe4b8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113135 Reviewed-by: Zach Anderson <zra@google.com> Commit-Queue: Zach Anderson <zra@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web
Dart has flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
Visit the dart.dev to learn more about the language, tools, getting started, and more.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.