Commit Graph

531 Commits

Author SHA1 Message Date
Danny Tuppeny 25bd38bbe2 [dds/dap] Enable verbose logging for debug_test
I'm struggling to reproduce the flakes noted in https://github.com/dart-lang/sdk/issues/60187 so hopefully verbose logs will help understand what's wrong.

Change-Id: Id76b30b4efc9fb63cfacd01d2df6dc5a8ea4c7eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411681
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
2025-02-24 09:19:29 -08:00
Ben Konyi 11ab2dfe2f Revert "[SDK] Switch dds and dtd to use an AOT snapshot"
This reverts commit 6450d76f1f.

Reason for revert: Breaking Flutter G3 roll

Original change's description:
> [SDK] Switch dds and dtd to use an AOT snapshot
>
> TEST=ci
>
> Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I9985919063cacfc8673b3e2946eaa163e90c9cc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411200
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-20 15:17:16 -08:00
Danny Tuppeny 7ec6bdc336 [dds/dap] Provide reason/message for unverified breakpoints
This adds some additional information to breakpoint response/events so that in VS Code a grey breakpoint has a tooltip that explains the reason.

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

Change-Id: I1defdbc9b62b8536b81efbe3f01626e6faf8db50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409280
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-02-20 09:37:29 -08:00
Danny Tuppeny 84e6ed0784 [dds/dap] Fix a race in DAP startup code that caused flaky tests
We start isolates paused so that we can send breakpoints before any code runs. This means we need to resume after initialization is complete.

It's important we don't try to resume multiple times during initialization (regardless of the order of isolate events or whether the isolate was found when we queried for isolates during connection).. This is done with the flag `startupHandled`.

One code path was not taking this flag into account, which meant multiple resumes were still possible. This seemed to occur on Linux during test runs (I've noticed the order of events being different on Linux in the past).

This change extracts the checking of `startupHandled` before sending `readyToResume` and uses it in all places that handle this kind of startup resume.

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

Change-Id: Ie2679fc806ab3edf007259298da82dbc8b802a6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410760
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-02-19 08:23:28 -08:00
asiva 6450d76f1f [SDK] Switch dds and dtd to use an AOT snapshot
TEST=ci

Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-13 09:11:38 -08:00
Danny Tuppeny 8dab178912 [dds/dap] Remove macro tests
This removes the macro tests but leaves the URI support until it's clearer we won't use this (or that it won't become a fully documented feature of DAP, in which case it would be better to use URIs instead of Paths anyway).

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

Change-Id: I4df448c98eb4cc352558234c8365a5e849deed7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408280
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-02-06 12:13:15 -08:00
Jason Simmons 217bfed9bd [ DDS ] Add middleware that converts exceptions thrown by handlers into error responses
Handler functions may return a Future<Response> that completes with an error.  If that happens, then the top level error handling in the Shelf server will try to log the error to stderr.

But this will fail because DDS closes its stderr at startup.  So Shelf will not write any response to the client, and the client will time out.

This PR adds a middleware to the DDS pipeline that receives errors thrown by the pipeline's handlers and returns a failure response.

Change-Id: I31beaf6abb0cbb42137c6b03f6081809de5d7119
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405681
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-01-28 10:10:57 -08:00
Mohamed Abdelaal 9b7bb9df90 Fix "the the" typo
Closes https://github.com/dart-lang/sdk/pull/59926

GitOrigin-RevId: cb37bca473b0c177b876a0f4e75858cd1862e699
Change-Id: I6827241b22e99db455945afcdfbaee0450999ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404923
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-21 14:08:20 -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 acf43c7587 [dds] Build DevTools URL using querystring, not fragment
DevTools now uses page URLs so we don't need to put the querystring as a fragment. The original code did work, but it complicates things for other code (such as code injecting `?wasm=true`) so should be updated.

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

Change-Id: I80ff4d78a3df1f77740a9b8f61ef5499bd008eda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399681
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-12-19 12:54:42 -08:00
Kenzie Davisson 0a71249650 Add support for connecting a debug version of DevTools to the DevTools server.
Requires https://github.com/flutter/devtools/pull/8621.

Bug: https://github.com/flutter/devtools/issues/6486
Change-Id: I57b6a6d1551831d89cc7d007376291e8cffd920e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366421
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
2024-12-13 09:14:55 -08:00
Devon Carew abb17bc59d [dds] update dds and dtd to be forward compatible with an upcoming release of package:shelf_web_socket
Change-Id: I7bcbacaad44358759d8856b0bcf0b99120e79e89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398584
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-12-03 20:41:53 +00:00
Danny Tuppeny a65067fb9d [dds/dap] Try to fix some flaky tests
While reviewing logs for flaky DAP tests, I found that these tests have been failing sometimes with errors that look like the isolate might not have paused on the `debugger()` call yet:

```
evaluateInFrame: (113) Expression compilation error
 _buildExpressionEvaluationScope: invalid 'frameIndex' parameter: 0
```

and

```
evaluateInFrame: (113) Expression compilation error
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Undefined name 'myInstance'.
myInstance
^^^^^^^^^^
```

This waits for the isolate to be paused, not just runnable, which I think might fix this.

Change-Id: Ib1d6b1c44a7ef93452065aa43c4d05058914db28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395302
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-11-27 17:01:29 +00: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
Ben Konyi 3fe58da3cf [ DDS ] Fix race condition in Mutex
The lock was being released but not reacquired when the next request
resumed, potentially leading to a race.

Change-Id: Ib00ae40ca8c1dfff6b98bbf642032c57d498fa40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394760
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-11-12 20:50:21 +00:00
Danny Tuppeny 74d84f397e [dds/dap] Ensure 'allThreadsContinued' is always explicitly set on ContinuedEvents
+ same for allThreadsStopped, just in case!

Fixes https://github.com/Dart-Code/Dart-Code/issues/5252
May fix https://github.com/dart-lang/sdk/issues/56367

Change-Id: I01ad062d0723301ab59f46a6052162ec1931a8c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394301
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-11-12 15:56:00 +00:00
Danny Tuppeny d131404ddd [DAP] Normalize Directory.current in DAP before launching the process
We normalize paths to have uppercase drive letters in many places in DAP to avoid mismatches of things like breakpoint paths if the client sends mixed casing.

It's not clear why the change to not host DDS internally affected this, but it seems sensible to perform this normalization here because we're normalizing everywhere else and right now the paths are treated as case-sensitive in many places.

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

Change-Id: Ie63ef66058ff9d37955659a780f7bd40cdfc2dc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392442
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-11-11 20:19:55 +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
Danny Tuppeny 97ab888201 Remove spawning of DDS from DAP and let the spawned dart run/dart test do it
Fixes https://github.com/dart-lang/sdk/issues/56733

Change-Id: I23acd9ba4cd48dd7fe5e23fc388d143db8779754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386500
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-10-24 20:44:34 +00:00
Derek Xu da9d9f254b Reland "[DDS] Make runDartDevelopmentServiceFromCLI use IPv6 to serve DDS if either the VM Service address or the bind address cannot be resolved to an IPv4 address"
This is a reland of commit 4391ca6643

I have verified that internal CL 687283510 will permit this change to
land without issue.

Original change's description:
> [DDS] Make runDartDevelopmentServiceFromCLI use IPv6 to serve DDS if either the VM Service address or the bind address cannot be resolved to an IPv4 address
>
> TEST=CI
>
> Fixes: https://github.com/dart-lang/sdk/issues/56557
> Change-Id: Id06532aedf26d8d5e4d037df72dece2d6550e694
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: Ib7536f61d49526e67d449ca0a475f379ad4bd362
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390760
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-10-18 14:38:07 +00:00
Derek Xu cec29f1306 Revert "[DDS] Make runDartDevelopmentServiceFromCLI use IPv6 to serve DDS if either the VM Service address or the bind address cannot be resolved to an IPv4 address"
This reverts commit 4391ca6643.

Reason for revert: breaks internal tests

Original change's description:
> [DDS] Make runDartDevelopmentServiceFromCLI use IPv6 to serve DDS if either the VM Service address or the bind address cannot be resolved to an IPv4 address
>
> TEST=CI
>
> Fixes: https://github.com/dart-lang/sdk/issues/56557
> Change-Id: Id06532aedf26d8d5e4d037df72dece2d6550e694
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: I02709235d32abab122b5269a5d80f12c4085988b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390542
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-10-16 22:15:28 +00:00
Danny Tuppeny dfa9cc0f48 [dds/dap] Enable verbose logging for flaky test
Trying to track down the failure shown here, but haven't had any luck reproducing it locally or on the trybots:

https://dart-ci.appspot.com/log/pkg-linux-release/unittest-asserts-release-linux-x64/28665/pkg/dds/test/dap/integration/debug_exceptions_test


Change-Id: Ied27b69324a602a4039eedfe997c604f6212f5b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390221
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-10-15 17:28:25 +00:00
Derek Xu cdacfd80f1 [VM/Debugger] Ensure that a breakpoint can only resolve on the exact line that was specified in a request
TEST=CI

Fixes: https://github.com/dart-lang/sdk/issues/56820
Change-Id: Ic04400ce6a15d7a2450b05bd5753087350ae52b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388460
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-10-15 16:57:36 +00:00
Derek Xu 4391ca6643 [DDS] Make runDartDevelopmentServiceFromCLI use IPv6 to serve DDS if either the VM Service address or the bind address cannot be resolved to an IPv4 address
TEST=CI

Fixes: https://github.com/dart-lang/sdk/issues/56557
Change-Id: Id06532aedf26d8d5e4d037df72dece2d6550e694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389521
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-10-10 19:22:50 +00:00
Derek Xu bfbbe5c6b6 [VM/Service] Delete all the Service ID zones created by a client when it disconnects
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>
2024-10-02 15:46:31 +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 2cf6ba2d55 [dds/dap] Handle VM Service shutdown exceptions when resuming
This will hopefully fix the flaky tests noted in https://github.com/dart-lang/sdk/issues/55313. I believe when we resume from pause-on-exit, the VM might shut down fast enough that the response is not handled and throws "Service connection disposed" (see https://github.com/dart-lang/sdk/issues/55313#issuecomment-2376593906).

This change will discard any known shutdown errors while sending the request instead.

Change-Id: I7c10aa3eddd6e651114ddba948b0a17688352720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386806
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-26 15:56:42 +00:00
Ben Konyi 12d9f40961 Reapply "[ CLI ] Don't disable DDS when --disable-dart-dev is provided"
This reverts commit 9f5246e8c6.

TEST=Existing tests

Change-Id: I658290f248d8b26c05f24b7125c3ba71de318bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385121
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-09-26 15:29:05 +00:00
Danny Tuppeny 560adc7dc6 [dds/devtools] Switch to always using a relative base href in DevTools pages
This avoids the server needing to know the exact URL path being used on the client, so proxies that rewrite the path (such as code-server) can still work.

See https://github.com/flutter/devtools/issues/8067#issuecomment-2236419703

Change-Id: I5b131d84232c63f5495ccbb533da727cce514de5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376682
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-26 15:19:54 +00:00
Derek Xu 6121c396ee [VM/Service] Expose Service ID zone APIs in service.md and package:vm_service
TEST=pkg/vm_service/test/id_zones_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/running_isolates.dart.
Change-Id: Id63180fd08a88865064435b056fa3269835cd476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-09-25 17:28:44 +00:00
Danny Tuppeny 34c223c8f9 [dds/dap] Temporarily enable verbose logging for test runs
This may help track down the flakes discussed in https://github.com/dart-lang/sdk/issues/55313 (see https://github.com/dart-lang/sdk/issues/55313#issuecomment-2329050007).

Change-Id: I1a2bc2996ab45498c9b34834df692d5a51982fff
Cq-Include-Trybots: luci.dart.try:pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383640
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-09-13 16:01:59 +00:00
Chingjun Lau 2483d300f9 Change the type of google3WorkspaceRoot to String.
This is a followup to https://dart-review.googlesource.com/c/sdk/+/383901

Remove the temporary backward compatibility now that users of this
function has all been migrated.

Bug: b/364942683
Change-Id: I8f951c6eb143497fb9edbf1465417d121a1cbf72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384827
Auto-Submit: Chingjun Lau <chingjun@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-09-13 14:27:11 +00:00
Ben Konyi 9f5246e8c6 Revert "[ CLI ] Don't disable DDS when --disable-dart-dev is provided"
This reverts commit 81b9957bdd.

Reason for revert: Breaking multiple configurations.

Original change's description:
> [ CLI ] Don't disable DDS when --disable-dart-dev is provided
>
> Fixes https://github.com/dart-lang/sdk/issues/56605
> Fixes https://github.com/dart-lang/sdk/issues/54841
>
> TEST=N/A
>
> Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Phil Quitslund <pquitslund@google.com>

Change-Id: I5c6cb302d8160f19bad437341cdcd80bcc08d921
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384881
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-09-12 01:15:27 +00:00
Ben Konyi a5cd16c0cb [ DDS ] Fix failing tests
Fixes failing tests introduced by
https://dart-review.googlesource.com/c/sdk/+/383780.

Change-Id: I700543f4dc6481dd905ffdc44177b009612565d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384880
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-09-11 21:43:08 +00:00
Ben Konyi 81b9957bdd [ CLI ] Don't disable DDS when --disable-dart-dev is provided
Fixes https://github.com/dart-lang/sdk/issues/56605
Fixes https://github.com/dart-lang/sdk/issues/54841

TEST=N/A

Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-09-11 18:01:25 +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
Ben Konyi 13b2e73fe2 [ DDS ] Prep for 4.2.7 release
Change-Id: Iad4af13c3744743937e5412e546ef8d260122ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384620
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-09-10 19:15:16 +00:00
Chingjun Lau 1850fbbb3a Change the type of google3WorkspaceRoot to Uri | String.
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>
2024-09-06 16:07:00 +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
Ben Konyi 1bf48b070c [ DDS ] Prepare for 4.2.6 release
Change-Id: Ibd9f120837f7fba997a08fef009459f21bbd9e4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382940
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-08-29 18:53:10 +00:00
Derek Xu 6b978a8339 [VM/Service] Add secret _idZoneId parameters to all Service methods
TEST=pkg/vm_service/test/id_zones_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/running_isolates.dart.
Change-Id: Ib8af3f073f6db9172df90a5ea221269411f72156
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379545
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Ben Konyi 1c002567b8 [ DDS ] Add tests for DDS exception parsing
Follow up to https://github.com/flutter/flutter/issues/152684

Change-Id: I9477ccae9f1eab63a800443c654ae3b348023d82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382021
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-08-23 19:23:00 +00:00
Ben Konyi 13285dc8f8 [ DDS ] Prefer IPv6 addresses if the VM service is using IPv6
Fixes https://github.com/dart-lang/sdk/issues/56557

Change-Id: I6c18f31a49e6e0d924a467b4b8c1f9d5709d47d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382020
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-08-23 15:33:54 +00:00
Ben Konyi e0d140c01e [ DAP ] Migrate DAP to launch DDS with DartDevelopmentServiceLauncher
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>
2024-08-22 19:46:11 +00:00
Srujan Gaddam ac038f7e84 [dds] Roll chrome_tag, browser_launcher_rev, and add --use-mock-keychain flag to dds
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>
2024-08-22 18:17:51 +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