Skip to content

Commit

Permalink
Launch DDS from Dart SDK and prepare to serve DevTools from DDS (#146…
Browse files Browse the repository at this point in the history
…593)

This change is a major step towards moving away from shipping DDS via
Pub.

The first component of this PR is the move away from importing
package:dds to launch DDS. Instead, DDS is launched out of process using
the `dart development-service` command shipped with the Dart SDK. This
makes Flutter's handling of DDS consistent with the standalone Dart VM.

The second component of this PR is the initial work to prepare for the
removal of instances of DevTools being served manually by the
flutter_tool, instead relying on DDS to serve DevTools. This will be
consistent with how the standalone Dart VM serves DevTools, tying the
DevTools lifecycle to a live DDS instance. This will allow for the
removal of much of the logic needed to properly manage the lifecycle of
the DevTools server in a future PR. Also, by serving DevTools from DDS,
users will no longer need to forward a secondary port in remote
workflows as DevTools will be available on the DDS port. This code is currently 
commented out and will be enabled in a future PR.

There's two remaining circumstances that will prevent us from removing
DevtoolsRunner completely:

 - The daemon's `devtools.serve` endpoint
- `flutter drive`'s `--profile-memory` flag used for recording memory
profiles

This PR also includes some refactoring around `DebuggingOptions` to
reduce the number of debugging related arguments being passed as
parameters adjacent to a `DebuggingOptions` instance.
  • Loading branch information
bkonyi authored Jul 15, 2024
1 parent f4f5567 commit f023430
Show file tree
Hide file tree
Showing 57 changed files with 920 additions and 747 deletions.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/android/android_device.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AndroidDevice extends Device {
this.productID,
required this.modelID,
this.deviceCodeName,
required Logger logger,
required super.logger,
required ProcessManager processManager,
required Platform platform,
required AndroidSdk androidSdk,
Expand Down
Loading

0 comments on commit f023430

Please sign in to comment.