It was resulting in weird situations where the tool would dump an
error message and stack but not quit, or would fail hard but then just
hang.
Instead, specifically catch errors you expect. As an example of this,
there's one error we expect from the DartDependencySetBuilder, so we
catch that one, turn it into a dedicated exception class, then in the
caller catch that specific exception.
This implements the `DartDependencySetBuilder` completely in Dart instead of calling out to `sky_snapshot` (Linux/Mac) or `gen_snapshot` (Windows) and allows us to use the same code path on all supported host platforms.
It also slightly reduces hot reload times on Linux from ~750ms to ~690ms for the unchanged flutter_gallery app and significantly reduces hot reload times on Windows from almost 1.5s to just slightly slower than on Linux.
This change will also allow us to retire `sky_snapshot` completely in the future.
* Add a check in case the flutter directory in .packages no longer exists. Clean up and prompt user
* Update documentation to use flutter packages get for end-users instead of flutter update-packages.
* Merge missing sdk error with the multiple sdk error. They're really the same thing.
* Use flutterPath in both checks.
* Change file_system’s copy folder to copy director which takes into account the file system
* Test support files
* Add test and split into 2 messages again.
* Move tests to run in memory file system's copy. Tested with dev/bots/test.sh
- [x] Introduce DependencyChecker which can determine if any dependencies have been modified.
- [x] Move the DartDependencyBuilder into a separate file.
- [x] Add unit tests for DartDependencyBuilder.
- [x] Add unit tets for DependencyChecker
Part of #7014