It's possible the browser has been closed but is in the SSE timeout period and therefore looks active. Ping it to see if it's actually responsive before deciding whether to reuse it or launch a new window.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3966.
Change-Id: I2fdcba036b8b63f7ab974e8fef5dd565c2917b64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257581
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Fixes a TODO.
+ some minor comment improvements.
Change-Id: I1f6249376e3891e0d20f01269493ffcc4d9aec55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253940
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
`log` was previously initialized after argument parsing had already
taken place, which caused an exception when an invalid flag was passed
to DartDev as `log` was referenced in the `dart fix` command
description, which is accessed when building the usage message.
Also fixes a minor test failure related to usage line lengths not being
set correctly for `dart devtools`.
Fixes https://github.com/dart-lang/sdk/issues/49437
Fixed: 49437
Change-Id: Ib367677db5f34d7b6da31e51dbe717c954298ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251241
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Flutter needs to send Debugger URIs to the client in some cases where we're not connected ourselves (profile mode, where the IDE wants a VM Service for DevTools, but is not debugging).
Change-Id: I901ca02be7c0bfff5130f2e41b83923b1d518e76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Fixes#49241
TEST=ci
Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This is a reland of commit a091ff7b27
TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
Original change's description:
> [ Service / DDS ] Add method that can return local paths
>
> TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
>
> Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I87433a410715393f853a6538dbfe67391e0c773b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246621
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This reverts commit a091ff7b27.
Reason for revert: Breaks DevTools and DWDS on internal roll
Original change's description:
> [ Service / DDS ] Add method that can return local paths
>
> TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
>
> Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,kenzieschmoll@google.com,helinx@google.com
Change-Id: I59d7687ba722fb1f5c706196691fc8471fe862ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246057
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This ensures that the `index.html` file (which determines whether to
load the new service worker and therefore invalidate the cache) will
always be fresh.
Bug: https://github.com/flutter/devtools/issues/3896
Change-Id: Ib0b6adda66b7dd926f57724f21c2a7c6284bce60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237842
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
This reverts commit bd8590ba9b.
Reason for revert: breaks google3 (b/224731131)
TEST=Clean revert
Original change's description:
> [ Service / DDS ] Remove VM service polling logic, add --enable-service-fallback-port support to DDS
>
> Polling logic was introduced due to a bug in Fuchsia's network stack
> which could result in the VM service attempting to start the server
> before the network stack was initialized. This issue should be resolved
> now, so this logic is no longer necessary.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I3016fad25220c4e5479f17294626d79a17bd316a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237360
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Polling logic was introduced due to a bug in Fuchsia's network stack
which could result in the VM service attempting to start the server
before the network stack was initialized. This issue should be resolved
now, so this logic is no longer necessary.
TEST=pkg/dartdev/test/commands/run_test.dart
Change-Id: I10f185dfb1be1b0363983f3e0564d65c38c99ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235763
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.
TEST=No behavior changes.
Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Should fix the flakes seen in https://github.com/dart-lang/sdk/issues/48274 caused by Isolate PauseStart events arriving during initialization but being delayed until initialization complete, and then auto-resuming isolates that ere deliberately being left paused.
Change-Id: Iee32731b92fe96b6b41e7e78c01af2f5e843ea92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Also moves ArgParser creation for `dart devtools` from dartdev to
devtools_server
Change-Id: I26e0c1a14eeccda163c9e62a240c4bd57a13f382
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230541
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Instead of hanging with no output to the console, a useful error message
is output to the console before shutting down the VM process.
Fixes https://github.com/dart-lang/sdk/issues/48160
Change-Id: Ib37c0cdf8b1bae6f164abff4a3b3100e944d8a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Will allow for us to remove dependencies on package:devtools_server in
various packages.
Change-Id: I055cc7bb05d5b4ce0071e3f88a71cb9596e76c74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228022
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Adds better error handling in DDS to prevent google3 breakages due to
Flutter binary update lag times.
This reverts commit 28e958febb.
TEST=N/A
Change-Id: Ida454f0ef3caeedd1b0326c37fef58d4b73557d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227620
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 91a496e5db.
Reason for revert: breaks hot reloads internally
Original change's description:
> Reland "[ VM / Service ] Omit private fields from service responses by default"
>
> This reverts commit 7d39d2dd51.
>
> TEST=N/A
>
> Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I6e751343244a4788a1f080ea1aef5fdd18417109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227503
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reduces dependency complexity for tools which don't need the full
contents of package:dds
Change-Id: Ib9c5ce93eea72421f56114ab8a8efaa0dca6ae02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225240
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>