TEST=pkg/vm_service/test/id_zone_deletion_on_client_disconnect_with_dds_test.dart,
pkg/vm_service/test/id_zone_deletion_on_client_disconnect_without_dds_test.dart,
CI
Issue: https://github.com/dart-lang/sdk/issues/55869
CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/client.dart and
sdk/lib/vmservice/running_isolates.dart.
Change-Id: I32a72ade89b858519c61b5124adbeafb835c3d61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381520
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Resolving the bind addres before passing it into startDartDevelopmentService was causing some problems with debugging web applications in g3.
TEST=patched these changes into g3 and confirmed that they restore the ability to debug the hello_flutter sample
Change-Id: I2e10be1e2e73245e00d2c3936697b736029a7d47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387280
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
devtools_shared 11.0.0 updates some signatures to use a new DTDInfo class to support both a local + exposed URI for DTD. A new CLI flag `--dtd-exposed-uri` for `devtools server` allows passing this second URI.
The DevTools server will use `--dtd-uri` to connect to DTD itself, but serve `--dtd-exposed-uri` to the frontend.
`--dtd-exposed-uri` is entirely optional and if not supplied, the value from `--dtd-uri` will be used in its place.
Change-Id: I5ab052ff9c4e7b2b186c1592f1ba2d63b7711113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
A subsequent CL will be sent to change this to String, after
flutter_tools is migrated to pass a String instead of a Uri.
BazelUriConverter treats google3WorkspaceRoot as a String. Passing a Uri
causes the debug adapter to pass `--google3-workspace-root=file:///`
when launching DDS, making it fail to resolve the uris.
Bug: b/364942683
Change-Id: I46f366bb2308a107a68e63445138e071432e45de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383901
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Chingjun Lau <chingjun@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Part of the process to remove uses of
DartDevelopmentService.startDartDevelopmentService in favor of launching
with `dart development-service`.
Change-Id: I857aee932c0b2fc6ae2172eb106b78c76d536295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380760
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
With this roll, Chrome now triggers a dialog on MacOS requesting
credentials. This results in timeouts for
pkg/dds/test/devtools_server/remote_control_test. To avoid user
input, we use a mock keychain instead. The same change has gone
into browser_launcher_rev, and so we include that commit here.
Bug: https://github.com/dart-lang/sdk/issues/56519
Change-Id: I0e0733b658eb09b0775178e617e5ceb42e184ec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381705
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Before this change, Service.controlWebServer would block on the first
call, waiting until DDS had finished starting to respond, while
subsequent calls would return as soon as the VM service HTTP server had
started, exposing the internal VM service URI. This could result in
clients connecting directly to the VM service while DDS was
initializing, only for them to be disconnected immediately once DDS
invoked _yieldControlToDDS.
Fixes https://github.com/dart-lang/sdk/issues/56254
TEST=pkg/dds/test/control_web_server_regress_56254_test.dart
Change-Id: Ic707882263caa9ffe832e768c37492dfde43b611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379700
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Capturing debug logs that includes VM Service traffic is useful for debugging. Previously with the new DAPs, this could only be enabled at session start which meant users would have to capture very large log files.
This adds the ability to enable/disable this logging while a debug session is already running. A related change in Dart-Code will send this request when you use the "Capture Debugging Logs" command, so you can start a debug session, get to the point of reproducing an issue, and then just capture the relevant logs (VM Service traffic included).
Fixes https://github.com/Dart-Code/Dart-Code/issues/5197
Change-Id: I7e766e57bd80819eb5da164e544903fae23927ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377222
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
This reverts commit 3370a4e393.
Reason for revert: Fixes landed in google3 (cl/650630536).
Original change's description:
> Revert "Reapply "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer""
>
> This reverts commit 44d4451476.
>
> Reason for revert: b/350443042
>
> Original change's description:
> > Reapply "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer"
> >
> > In the previous version of this change, if the user had 'dart' on their
> > PATH and invoked 'dart compile js' (which spawns the VM service after
> > compilation completes), the VM service would attempt to spawn DDS using
> > './dart' as the executable path instead of 'dart'. This would result in
> > DDS failing to start, causing the VM to print an error and hang.
> >
> > This updated change checks to see if the parent directory of
> > `Platform.executable` is '.' and then verifies if './dart' exists or
> > not. If it doesn't, 'dart' is likely on the user's PATH and should be
> > used directly as the executable path.
> >
> > See https://github.com/dart-lang/sdk/issues/56087 for details.
> >
> > This reverts commit 4b88698e48.
> >
> > TEST=pkg/dds/test/control_web_server_starts_dds_with_dart_on_path_test.dart
> >
> > Change-Id: Id0f1dadd01d9202cbf7717f31393b43171cf3968
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373561
> > Auto-Submit: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Derek Xu <derekx@google.com>
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
>
> Change-Id: I424c4b91b0b108ae4c9dffa0059ed90c918897e3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373744
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Change-Id: Id7ddff5a80399203fb8058d84bc89fda2073da95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375000
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
This reverts commit 44d4451476.
Reason for revert: b/350443042
Original change's description:
> Reapply "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer"
>
> In the previous version of this change, if the user had 'dart' on their
> PATH and invoked 'dart compile js' (which spawns the VM service after
> compilation completes), the VM service would attempt to spawn DDS using
> './dart' as the executable path instead of 'dart'. This would result in
> DDS failing to start, causing the VM to print an error and hang.
>
> This updated change checks to see if the parent directory of
> `Platform.executable` is '.' and then verifies if './dart' exists or
> not. If it doesn't, 'dart' is likely on the user's PATH and should be
> used directly as the executable path.
>
> See https://github.com/dart-lang/sdk/issues/56087 for details.
>
> This reverts commit 4b88698e48.
>
> TEST=pkg/dds/test/control_web_server_starts_dds_with_dart_on_path_test.dart
>
> Change-Id: Id0f1dadd01d9202cbf7717f31393b43171cf3968
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373561
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I424c4b91b0b108ae4c9dffa0059ed90c918897e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373744
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
In the previous version of this change, if the user had 'dart' on their
PATH and invoked 'dart compile js' (which spawns the VM service after
compilation completes), the VM service would attempt to spawn DDS using
'./dart' as the executable path instead of 'dart'. This would result in
DDS failing to start, causing the VM to print an error and hang.
This updated change checks to see if the parent directory of
`Platform.executable` is '.' and then verifies if './dart' exists or
not. If it doesn't, 'dart' is likely on the user's PATH and should be
used directly as the executable path.
See https://github.com/dart-lang/sdk/issues/56087 for details.
This reverts commit 4b88698e48.
TEST=pkg/dds/test/control_web_server_starts_dds_with_dart_on_path_test.dart
Change-Id: Id0f1dadd01d9202cbf7717f31393b43171cf3968
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373561
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 64d4689a78.
Reason for revert: Platform.executable doesn't return a path, just an executable name, which can cause breakages.
TEST=ci
Original change's description:
> [ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer
>
> TEST=pkg/dds/test/control_web_server_starts_dds_test.dart
>
> Change-Id: I2e51783592912e5a719685f2ab5e7537b7a59586
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366560
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>
Change-Id: I4ceaee4b5ca8f5557e90cd914ee69fe9aa5f85a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373381
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This moves the CLI logic into lib/src/dds_cli_entrypoint.dart so it can
be invoked by a custom google3 entrypoint (bin/dds.dart can't be
imported using a package: URI).
Since google3 will be able to perform some custom configuration of DDS,
google3 related logic (e.g., `BazelUriConverter`) is also removed. This
is technically a breaking change, but should be safe as this
functionality isn't currently being used.
Change-Id: I54d8a9927ff2df70e013ca5c8bc1d510b0b95f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371520
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Removes risk of DDS connection information being split across two stream
events, causing JSON decoding to fail.
Also updates DDS to close stderr, even in the error case.
TEST=Existing service and dartdev tests
Change-Id: I5cceab899aac1fa63bd7578dd658b34096722bd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371000
Reviewed-by: Derek Xu <derekx@google.com>