dart-sdk/pkg/dds_service_extensions
Ben Konyi 5536951738 [ DDS ] Rework client resume permissions API
This change reworks the client resume permissions API to make it easier
for clients to deal with user provided `--pause-isolates-on-start` and
`--pause-isolates-on-exit` flags.

`requireUserPermissionToResume` should be called by the tool that
launches the Dart process to indicate whether or not the user provided
`--pause-isolates-on-{start,exit}`. The default behavior is to assume
that a tool set these flags for its own use (e.g., resetting breakpoints
after a hot restart in Flutter), where isolates will resume immediately
after each client that has indicated interest in that pause event has
invoked `readyToResume`.

If a user provided one of the previously mentioned flags, isolates will
not immediately resume after each relevant client has invoked
`readyToResume`. Instead, a call to `resume()` must be made to indicate
the user has triggered the resume request instead of tooling. If the
user permissions to resume are changed while the isolate is paused and
all relevant clients have invoked `readyToResume`, the isolate will
automatically resume if the user no longer requires us to wait for a
user resume.

`resume()` now also acts as a "force resume", bypassing any required
permissions set by tooling.

This behavior change is breaking, so the DDS protocol version is being
bumped to 2.0.

`package:dds_service_extensions` has also been updated to include the
following DDS RPCs:

 - `requireUserPermissionToResume`
 - `readyToResume`

Change-Id: Id5f0806b3c56507d39eb00b6305b8896bab13ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357420
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-03-21 21:09:42 +00:00
..
lib [ DDS ] Rework client resume permissions API 2024-03-21 21:09:42 +00:00
test
.gitignore
analysis_options.yaml [pkg] use package:lints when analying pkg/ 2022-07-07 14:29:22 +00:00
CHANGELOG.md [ DDS ] Rework client resume permissions API 2024-03-21 21:09:42 +00:00
LICENSE
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml [ DDS ] Rework client resume permissions API 2024-03-21 21:09:42 +00:00
README.md [pkg] normalize the headers of the pkg/ readmes 2022-05-31 21:00:13 +00:00

pub package package publisher

A package used to expand the package:vm_service interface with support for RPCs added in the Dart Developer Service (DDS) protocol.