Commit Graph

196 Commits

Author SHA1 Message Date
Derek Xu 0dc489a5dd [package:dds] Prepare to publish version 5.0.1
Change-Id: Id7ae4be715d4eec7e2122547b7f99bd275e0dbe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430160
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-05-21 11:10:09 -07:00
Jake Macdonald 94d06474d2 Bump tools to 11a7719ffc6573b62d164a3188b8c2131b6ef6c3
Changes:
```
> git log --format="%C(auto) %h %s" 4a28415..11a7719
 https://dart.googlesource.com/tools.git/+/11a7719ff allow custom ID generators in Clients, and support String ids (2077)
 https://dart.googlesource.com/tools.git/+/93276f5bf Support newInstanceNamed with empty name (1194)

```

Diff: https://dart.googlesource.com/tools.git/+/4a284152c263a5d3429d5ab6acfdb70eca2ebcfb..11a7719ffc6573b62d164a3188b8c2131b6ef6c3/
Change-Id: Ib9a6d6b1da81d6bd2e460d3506f592333604548a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423480
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2025-04-21 12:21:47 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard b9b77058a9 Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.

All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.

All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 05:21:40 -07:00
Sigurd Meldgaard ca3cea291c Bump language version for pkg/dds_*
Extracted from https://dart-review.googlesource.com/c/sdk/+/397164
Which migrates the sdk to resolve as a pub workspace

Pub workspaces requires a language version of 3.5.

Change-Id: I74abaac7dec6b88bc0453ef799748c4cbc3026e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412084
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2025-02-27 07:00:27 -08:00
Devon Carew 161b8e9cc1 Bump shelf to bf799519cda2898a7c5af06dcfdd5fe6443afd79
Changes:
```
> git log --format="%C(auto) %h %s" 2b5b683..bf79951
 https://dart.googlesource.com/shelf.git/+/bf79951 Publish shelf_router_generator 1.1.1 (467)
 https://dart.googlesource.com/shelf.git/+/8ea524b Bump actions/cache from 4.1.2 to 4.2.0 in the github-actions group (465)
 https://dart.googlesource.com/shelf.git/+/6b8b338 shelf_router_generator: bump dependencies (464)
 https://dart.googlesource.com/shelf.git/+/e3975a8 add more type information to the 'webSocketHandler' method (463)

```

Diff: https://dart.googlesource.com/shelf.git/+/2b5b683e78f5cc84e479a43297fd7b5489d7db02..bf799519cda2898a7c5af06dcfdd5fe6443afd79/
Change-Id: I6ac9ef9bf1f5533ecabcf920c6deaf7c9216dd3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403964
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2025-01-13 16:34:30 -08:00
Ben Konyi 238db6e701 [ DDS ] Fix package:vm_service constraints before publishing 5.0.0
vm_service 14.3.0 is required for DDS to support id zones.

Change-Id: I8c0c4a64e5910d222af87ee447c1b004d9eab5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404040
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-01-13 12:42:19 -08:00
Ben Konyi 1eee8bae3a [ DDS ] Allow for vm_service >=14.0.0 <16.0.0 for package:dds and package:dds_service_extensions
Change-Id: I4431a05076e8b09bbf891e3a49648413281f11f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403880
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-01-09 09:08:03 -08:00
Danny Tuppeny 131fe7b525 [dds/dap] Extract URIs from stack traces with regex instead of package_stack_trace
package:stack_trace only parses stack traces in very specific formats and this has caused us to miss some in the past. https://github.com/Dart-Code/Dart-Code/issues/5360 reports that this is also the case when there is any prefix (including `flutter:`) in the output.

Rather than trying to clean up the input to pass to package:stack_trace, this just uses a simple regex to extract the URIs (and optional line/cols) from the line instead.

Fixes https://github.com/Dart-Code/Dart-Code/issues/5360

Change-Id: I13192fb201499f6cee6e28e7aa86d882557c0232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400380
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-01-06 09:19:24 -08:00
Danny Tuppeny a990da0992 [dds/dap] Set supportsANSIStyling=true in DAP server capabilities
This is the proper fix for https://github.com/Dart-Code/Dart-Code/issues/5302, which is to advertise to clients that we may use ansi color codes in output events.

It requires increasing the DAP constraint because this field was added to the DAP package in 1.4.0 and we need to ensure anyone (like Flutter) building on top of this base debug adapter has a matching version.

Change-Id: Ie595cda91389f1c7f031a657c96e9f7480b00933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397521
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-11-26 15:56:30 +00:00
Danny Tuppeny 5b9d75ff20 [dds/dap] Use ID Zones for evaluation requests and invalidate them on resume
Fixes https://github.com/dart-lang/sdk/issues/56794

Change-Id: Ied408503d22c4abb2c4f996f6c9b7847b8ad82be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389960
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-10-30 18:41:13 +00:00
Derek Xu c4a77dce65 [DDS] Make runDartDevelopmentServiceFromCLI pass the specified bind address directly into startDartDevelopmentService
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>
2024-10-01 14:32:29 +00:00
Kenzie Davisson 716deb3a26 Bump tools_rev in DEPS.
This needs to be bumped so that the latest changes to unified_analytics can be automatically rolled into g3 with the next Dart SDK roll.

Change-Id: I766951852258acfdfd66aa960412f3f5d6ac6fb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387502
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-09-30 22:50:51 +00:00
Danny Tuppeny f50975e3b5 [dds] Bump DDS to 5.0.0, use devtools_shared 11.0.0, and support a second DTD URI for web editors
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>
2024-09-11 17:05:09 +00:00
Danny Tuppeny e099a00ee2 [dds] [vm_service] Add a new RPC error code for "Service Disposed" errors
This is not currently used for errors but just adds constants to allow clients to write code to handle these kinds of errors so we can use them in future (instead of generic error codes with string messages).

DAP is also updated ready to handle this error code.

See https://github.com/flutter/flutter/issues/153471

Change-Id: I6ad030d0317e9a70d9e28578787edec75554daad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381501
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-03 14:54:18 +00:00
Kenzie Schmoll 428e52e00c Bump DevTools DEPS and bump the devtools_shared dependency in DDS.
Change-Id: I561d0880cb35ca04b3ae3fdefdb4700003db3fd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381380
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-08-19 21:12:48 +00:00
Danny Tuppeny 212e49fda6 [dds/dap] Treat "Service Connection Disposed" the same as "Client closed with pending request"
Should fix https://github.com/flutter/flutter/issues/153473

Change-Id: I77bcf2da01d340412c3dc709a74cc8ed2d80a43f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381181
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2024-08-19 18:12:14 +00:00
Ben Konyi dbe6d5852a Fix bad pattern matching in DDS exception parsing
Nullable types for values in map patterns require the key to be present. Since the 'uri' key is not always present in DDS exception responses, this was causing us to fall back to throwing a StateError.

Related issue: https://github.com/flutter/flutter/issues/152684

Change-Id: I929e1e880c4fc6f740ee595e6e852f23fa247b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378600
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-08-01 20:03:34 +00:00
Ben Konyi 6864b90126 [ DDS ] Fix DevTools URI not including a trailing '/' before query parameters
This could prevent DevTools from loading correctly as it expects assets
to be located at '<DDS_URI>/devtools/'

Fixes https://github.com/dart-lang/sdk/issues/56294

Change-Id: I0e976a42a9fb1b4896d238674d2c8c8ec99ce7ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376762
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-07-19 22:22:25 +00:00
Elliott Brooks e4e06c6cbd Read the showToUser field on DebugAdapterException to determine whether or not to show DAP errors to the user.
Currently, we are only showing errors to the user if they occur as part of the attach or launch workflows.

Note: The `showToUser` field was added in https://dart-review.googlesource.com/c/sdk/+/369720

Bug: https://github.com/dart-lang/sdk/issues/55789
Change-Id: Idd6bc233fd2f1d5420292095517fd050715e1311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368523
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-07-08 17:31:42 +00:00
Ben Konyi 1c57c6cbae [ package:dds ] Update CHANGELOG and pubspec to 4.2.4+1 (republished 4.2.4)
4.2.4 was retracted due to an extra binary being included in the archive
that increased the package size by 10x.

Change-Id: Iebca85555e871fee22bafdd1bf547972bfe5b201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372920
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-06-24 14:13:55 +00:00
Helin Shiah 70988840f2 Add type Event ot postEvent
IntelliJ expects a "type" field for events; otherwise the JSON will not be parsed correctly. This came up as part of making the widget rebuild table in DevTools clickable (https://github.com/flutter/devtools/issues/4564)

I'm not totally sure this is the change I need, as I don't know how to test this out end-to-end (build Dart SDK and put into Flutter SDK, then run an app with these changes in DDS?). I think it's right because I'm modifying a spot that was first added in https://dart-review.googlesource.com/c/sdk/+/304981, which added `postEvent` in dds_service_extension.

Change-Id: I9a78903dca7855896b6a9b9c3f9e1d62dcb7099e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368202
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-05-29 17:49:34 +00:00
Derek Xu b2a27cbf90 [DDS] Add missing await of WebSocketChannel.ready
TEST=pkg/dds/test/unawaited_web_socket_channel_ready_regression_test

Fixes: https://github.com/dart-lang/sdk/issues/55731
Change-Id: I4629618f74ca42927cd3291cb04a63aa4e938b82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368001
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-05-23 18:52:23 +00:00
Danny Tuppeny 3ca4243818 [dds/dap] Handle errors during VM Service connection/initialization and ensure they're reported to the user
Sometimes we see unhandled exceptions during this setup work, see:

- https://github.com/flutter/flutter/issues/148346
- https://github.com/flutter/flutter/issues/148348

Currently these are unhandled and bring the debug adapter down. In VS Code, the error (send to stderr) is not visible to the user so they just see a silent crash which makes it very difficult to report (and the Flutter crash reports don't have any context).

This change will send the exception to the client and then cleanly terminate, which should give the user more information to open a good bug report (assuming the issue wasn't just something like them terminating the app as it was starting).

Change-Id: I4aefbc278e6a0708924c6fa41c5179d581117689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366662
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-05-16 19:39:57 +00:00
Kenzie Schmoll adfbcc7657 Update DevTools rev to e15c47243362b160646f03df9b1ad8d41e9a2d30
Change-Id: I8def4dca26b200a9f03cfbd2ef8e66edb0f6bac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364621
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-04-26 21:31:31 +00:00
Danny Tuppeny 2f2564c99f [dds/dap] Don't untruncate toString() values in debug views
Generally we don't untrucate values in the debugger in places where there might be lots of data (such as calling `toString()` on all variables) because it can cause performance issues if the variables are huge.

If you use the "Copy value" ("clipboard") or Debug Console evaluation ("repl") we _do_ always untruncate the values.

However, this code was always untruncating when we called `toString()` on custom classes. This changes it to no longer do so, making long string values consistent between what you see as the values of fields, and the `toString()` results against a class.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4986

Change-Id: Ica3c5ecfed9492ab76fbfa83d161765b3b24eb22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363320
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2024-04-24 15:54:24 +00:00
Danny Tuppeny 717aa6396c [dds/dap] Parse all output events for stack frames instead of online stderr
The legacy debug adapters would scan all output for stack frames but when building the new adapters I only parsed stderr (because the stack frame parsing captures quite a lot and it seemed unnecessary). It turned out many users appreciated the IDE linking up stack traces in stdout too (because their exception logging framework may handle exceptions and print them this way, or they might have helpers to print the current stack trace to aid debugging).

This marks `parseStackFrames` as deprecated from `sendOutput` and scans all output for frames, while filtering out things that don't look like Dart URIs before calling `lookupResolvedUris` to try and avoid making general output async/slow.

If Flutter considers deprecations a bot failure, this will need to be rolled in manually.

Fixes https://github.com/Dart-Code/Dart-Code/issues/5072

Change-Id: I8857281fb79ca69328074d6ad6a0c0a505e5c193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362804
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2024-04-16 16:35:41 +00:00
Brian Quinlan 004d226a5e Allow package:dds and package:dtd to accept the next release of shelf_web_socket and web_socket_channel
Bug:https://github.com/dart-lang/web_socket_channel/issues/340
Change-Id: I3dff79a66876005eb77a33f1f82f8ac5d19e764f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362192
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-04-11 20:09:36 +00:00
Kenzie Schmoll 27648f6b3a Upgrade DDS dependency on devtools_shared to ^9.0.1.
This upgrade requires adapting to breaking changes for the unified_analytics and DevTools extensions logic in `devtools_shared`.

unified_analytics:
- remove the `unified_analytics` dependency from DDS. The DevTools server handler no longer interacts with this package.

DevTools extensions:
- Serve DevTools extensions from their absolute location in the pub cache.

Bug: https://github.com/flutter/devtools/issues/7547
Change-Id: I13e08c48c5335cccbddecebe907ff9dcc337c461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362062
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-04-11 16:02:48 +00:00
Elliott Brooks 9382e58fc9 Set requireUserPermissionsToResume based on pause-isolates-on-start and pause-isolates-on-exit flags
Bug: https://github.com/flutter/devtools/issues/7231
Change-Id: I4665cce72ad9b505cbf513ea151698d5de4eb3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360441
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-04-08 18:54:26 +00:00
Kenzie Schmoll c042924d0d Add UnifiedAnalytics service to the Dart Tooling Daemon.
This CL also removes unified analytics code from DDS and DevTools server.

Bug: https://github.com/dart-lang/sdk/issues/55280
Change-Id: I6f1c56cb8dce6f611ee73de7081c0a9cd43187c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360221
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-04-04 00:20:32 +00:00
eliasyishak 4ea4eec023 Update DEPS
R=jacobr@google.com

Change-Id: I70dbe194f519d50f6a0cb244b1f80bd6c1fa9186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360540
Commit-Queue: Elias Yishak <eliasyishak@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-04-02 19:32:22 +00:00
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
Ben Konyi 6eb85949fd [ VM / DDS ] Add --print-dtd-uri flag and launch DTD from the correct snapshot for AOT
This adds support for printing the DTD connection information to stdout
when --print-dtd-uri is passed.

This change also fixes an issue where DDS would fail to spawn an isolate
with the DTD snapshot when DDS was running in AOT mode. This means the
SDK must be shipped with both AppJIT and AOT DTD snapshots, at least
until dartdev is moved to run from AOT.

Fixes https://github.com/dart-lang/sdk/issues/55034

TEST=run_test.dart

Change-Id: I788ef9bfe76297a8d594992a2aac440ed9e2ecac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358541
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2024-03-21 19:50:46 +00:00
Kenzie Schmoll 77ac59ad09 Update package:devtools_shared dep to version 8.0.1
Change-Id: I4f2acded3f990f965ff96813b20a033775f9e87a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358223
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-03-18 18:16:53 +00:00
Danny Tuppeny d931bec5d3 [dds/dap] Fix an issue with DAP Source.name being file paths when package: and dart: URIs are expected
The move to URIs introduced a subtle bug here - we would use the mapped URI (which is almost always `file:`) to decide whether to show a file path, instead of doing it only if the unmapped URI was a `file` (eg. it could have been `package:` or `dart:`.

This wasn't caught by any tests here, but was caught in the Flutter roll (https://github.com/flutter/flutter/pull/145235). This fixes it and adds a new test that we verify the Source names for local files, packages, and dart: URIs.

Change-Id: I282bf935b9fa4016abeafd556dfd368950ee9611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357325
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-03-18 15:53:49 +00:00
Ben Konyi 6699bf7ffa [ package:dds ] Prepare for 3.3.0 release
Change-Id: I66bfbe591c46698734cd2ce7aa772f032a91a99a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358000
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-03-15 19:35:58 +00:00
Danny Tuppeny f1a6b4025c [dds/dap] Bump package:dap and the version used by DDS
DDS relies on a new class `DartInitializeRequestArguments` added to `package:dap`.

Change-Id: I25b61a3a710c6867c55a545a6f6c4646dc4ba3f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355180
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2024-02-29 19:22:19 +00:00
eliasyishak 247c3e147a Reland "Add parameter for analytics instance"
This is a reland of commit 0e5542211c

Original change's description:
> Add parameter for analytics instance
>
> R=sstrickl@google.com
>
> Change-Id: I8ef2fe2c757a7625c2e3aa7eba48513e4c2f4e88
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352561
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>

Change-Id: Ia4b84fe72e235138c81ca58c32a78859804fafae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353320
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Auto-Submit: Elias Yishak <eliasyishak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-21 22:38:50 +00:00
Elias Yishak 53cbcc8c81 Revert "Add parameter for analytics instance"
This reverts commit 0e5542211c.

Reason for revert: breaking google3 tests

Original change's description:
> Add parameter for analytics instance
>
> R=sstrickl@google.com
>
> Change-Id: I8ef2fe2c757a7625c2e3aa7eba48513e4c2f4e88
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352561
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>

Change-Id: Iec1f2eb0224e8ff8b0375736a96f3986c42cacaa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353040
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-19 08:58:28 +00:00
eliasyishak 0e5542211c Add parameter for analytics instance
R=sstrickl@google.com

Change-Id: I8ef2fe2c757a7625c2e3aa7eba48513e4c2f4e88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352561
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-02-17 00:09:29 +00:00
Derek Xu 6ca01d0854 [package:dds] Prepare to publish v3.2.0
Change-Id: Ife473a673b673ec982ee339242235807530b04fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-13 18:21:35 +00:00
Dan Chevalier 03f797a85a Solidify dtd lifecycle
- devtools server can now take the dtd uri as a parameter on startup
   - dtdUri is passed to the server handler so that devtools can request it.
- FileService is implemented inside the Dart Tooling Daemon (dtd_impl)
    - Added FileService.setProjectRoots
    - Added unit tests and rpc exceptions
- on startup dtd now prints { uri, secret } so that the caller has the secret that allows them to call FileService.setProjectRoots

Fixes: https://github.com/dart-lang/sdk/issues/54790

Change-Id: I7a66aca2f8f06f6a611a46c727a9d5c2485fbe3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346922
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-13 16:17:18 +00:00
Alexander Thomas e609c8232b [dds] Remove copy of dap tool
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Bug: b/286184681
Change-Id: I408d36a10dde43e3e182d57685f7d8423124461b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344021
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-01-09 10:45:30 +00:00
Ben Konyi 527cc7df50 [ DDS ] Reland 3.1.2 pubspec and CHANGELOG after 3.1.0+1 hotfix release
Change-Id: I2e451d3300c0c6a67f5559de4f361ffe54ea8f9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344761
Commit-Queue: Christopher Fujino <fujino@google.com>
Reviewed-by: Christopher Fujino <fujino@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-01-04 19:31:04 +00:00
Ben Konyi 5362a20f27 [ DDS ] Create 3.1.0+1 patch release
Reverts vm_service major version bump (13 -> 14) from 3.1.1, but is
otherwise identical to 3.1.2.

Change-Id: I9e6595a4a4565586284d7ab4601fd9e49711d87d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344760
Reviewed-by: Christopher Fujino <fujino@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-04 18:39:29 +00:00
Kenzie Schmoll c680feedaf Improve error handling for serving static DevTools assets.
Change-Id: I2b62461a64ef6aa8b544b4ace894d7b5ded0912e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343000
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-20 21:07:39 +00:00
Kenzie Schmoll a86eb8bd11 Bump devtools_shared dependency to ^6.0.3
Change-Id: I611457fec4032e06cb5456020e884530e42f0b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342720
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-12-19 21:27:33 +00:00
Derek Xu 53be2cb558 [package:dds] Prepare to publish version 3.1.1
Change-Id: I56132705e10657a3210f9b9938744fb2ce3e8bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341502
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-12-15 15:32:18 +00:00