Commit graph

17 commits

Author SHA1 Message Date
Danny Tuppeny d209ea9333 [dtd] Allow passing an explicit port to DTD
Removes the port from `startService()` (which as far as I can see is unused) and parses it from `args` instead.

I had to add support for "options" in the argument classes and switched from a bool flag `isFlag` to an enum to be a bit more descriptive (and be easier to support multi-options in future if required).

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

Change-Id: Ib08513139f58e8845a7c2cbbeeea06787dbc2df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371840
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-17 14:58:19 +00:00
Dan Chevalier ba8306735d Ensure that dtd handles relative paths correctly.
Change-Id: I1ebf22a9ae258741580660a8eaf77aa286e9affa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362400
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-04-15 14:29:03 +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
Kenzie Schmoll cfe3217378 Add getProjectRoots API to DTD
Bug: https://github.com/flutter/devtools/issues/7366
Change-Id: If0631f387306312655bdcbefe961692b00a7b4dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359320
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-03-25 19:52:21 +00:00
Dan Chevalier b626c255eb Updating DTD docs to ensure they are ready for the consumption.
Change-Id: Iccbf88959bbd68bac897e3f5b05dbf5fe2a0a4bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-03-22 01:28:39 +00:00
Dan Chevalier 8f995c27f2 Turn off default logging for dtd daemon
Change-Id: Iddb386017b91024aea51d546f7d729b38d870352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358502
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-03-19 17:03:20 +00:00
Kenzie Schmoll 408918d6f5 [dds] Start DTD from DevTools server if it is not already started.
Fixes https://github.com/dart-lang/sdk/issues/54937.

Tested: pkg/dartdev test for `dart devtools` command, and new `dtd_test.dart` in pkg/dds.
Change-Id: I530ba2fe4d5809082378b61c282ba7856974e21e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354460
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
2024-03-18 21:50:09 +00:00
Dan Chevalier 68c74e2a97 Add obfuscation token to DTD uri
Adding this token adds a small layer of security since the caller needs to have gathered the uri in some way rather than just stumbling on the DTD port.

Change-Id: I0665f4718d162daf94cb49fa1c6f4206c83d77cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355220
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-03-07 19:33:19 +00:00
Dan Chevalier 952e3b718f Add --unrestricted to DTD command.
NOTE: the tests view better if you turn off whitespaces on the diff.

This command will start a DTD instance that has the FileSystem service restrictions disabled. Which can be used in development environments.

Bug: https://github.com/dart-lang/sdk/issues/54762
Change-Id: I829f83d7c7afc7dd83732fc8a600cb41ffe36f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352921
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-20 20:08:57 +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
Dan Chevalier a995f7930b Solidify, test and document DTD errors
Change-Id: Ied0f1af43954e47a2c51837bd2fc8d7ce0e03fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345800
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-01-18 16:07:31 +00:00
Dan Chevalier 1efdc2ba36 Adding Dart Tooling Daemon protocol documentation
Change-Id: Ia95abccf1c400a5e2a595b89b961bc4c43f18ef6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-01-11 19:49:36 +00:00
Ben Konyi 3c42222b7e [ CLI ] Add tooling-daemon command to support launching the Dart Tooling Daemon (DTD)
This change includes the following:
 - A new `tooling-daemon` CLI command to launch DTD
 - Minor refactoring of package:dtd_impl to better match expected
   Dart package structure
 - Updated build rules to create dart_tooling_daemon.dart.snapshot

Change-Id: Idd91bc4ce64ce790db5bad323a50d9cf65523dc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344800
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-08 17:07:55 +00:00
Dan Chevalier 49cd3d9657 Adding file service to dtd_impl
Change-Id: Ifd9027a2d2d1e5e711de259ee09ce7e044a55db7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343021
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-21 14:34:09 +00:00
Dan Chevalier e58efcb049 Connecting DTD and DTD_impl together.
This change adds the happy path for DTD_impl and DTD being able to:
- register streams
- register serviceMethods
- postEvents to streams
- call serviceMethods

Change-Id: I73865071745ef19a4493f86714e0855930243dd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 15:36:22 +00:00
Dan Chevalier 27892de349 Adding DTD and DTD_impl owners.
I neglected to add these while adding pkg/dtd and pkg/dtd_impl.

Adding them now to make sure vm and devtools members have ownership before too many people go on holiday.

Change-Id: I379488255786ff9f4c9b2684a0672e57c5e6aff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 00:54:12 +00:00
Dan Chevalier a32d37ef84 Initial implementation of Dart Tooling Daemon server
This will contain the code for running the DTD server.

When this is fully funcitonal VSCode will be responsible for running the, and letting our other tools(i.e. DevTools) know which address it is running at.

Change-Id: Ia4cc9553f000a5e765f604541f4846b107d4d00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338501
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-12-15 15:05:09 +00:00