Adds support for writing the active VM service connection URI to the file
specified by `--write-service-info-to-file` and updates native bindings
with the web server address on startups.
TAG=agy
CONV=ae3a29f5-e2c8-499c-b221-ff61e40f5f1f
Change-Id: Ice85fda098031ef4ba1cd1120a917137aae97105
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505163
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Resolves issues in DevFS handling where individual stream file PUT
requests could result in flaky test failures on Windows.
TAG=agy
CONV=ae3a29f5-e2c8-499c-b221-ff61e40f5f1f
Change-Id: I55d12cc55f35d1d1ed36742d442a3d4bebad53bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505162
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Correctly define `kRootLibraryUri` constant and forward `rootLibraryUri`
to the resident frontend compiler.
TAG=agy
CONV=ae3a29f5-e2c8-499c-b221-ff61e40f5f1f
Change-Id: Ie4c87857744d9b32165ea7d0f8004d6d6c337886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505161
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Forward the `pause` parameter to the C++ runtime in reloadSources, and use
the path resolver helper to properly resolve raw Windows file paths during
hot reload compilation.
TAG=agy
CONV=ae3a29f5-e2c8-499c-b221-ff61e40f5f1f
Change-Id: Iab29cb94b390144d17f1c014ec2e9acd1ab1e11e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505160
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Adds isSystemIsolate in the isolate startup message sent to the
VM service, allowing for the service to identify the first non-system
isolate as the root isolate.
TEST=Existing tests
CoreLibraryReviewExempt: dart:vmservice is internal.
Change-Id: I0a982a1fc06bd0be0426ad9d1401e89375cbed40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500000
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
A few minor changes:
- Log output is now written to stderr.
- `Service.controlWebServer`'s `silenceOutput` parameter is now
respected, along with the `SILENT_OBSERVATORY`, `SILENT_VM_SERVICE`,
and `SILENT_SERVICE` Dart defines.
- DDS launcher state is cleaned up if the service server is shutdown
via SIGQUIT.
Change-Id: I0e3e271905ad6bc111151bac086fe7661c23d578
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491280
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
- Fixes issue where `streamListen(streamId: 'foo')` didn't result in an
error when DDS was not present.
- Adds stub for the deprecated `streamCpuSamplesWithUserTag`
Change-Id: Ic18c2b24a103347eee60ee803a873f747dbfee7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491200
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Also disables logging by default, which can be enabled by specifying the
`VM_SERVICE_LOGGING` environment variable.
package:vm_service test suite is ~99% passing with this change.
Change-Id: I41578cc8b39afac93589b8792861be34b848f558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490921
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
The DartRuntimeService based VM service implementation now has support
for launching DDS instances and responding to _yieldControlToDDS RPC
invocations from DDS instances.
package:vm_service test suite is ~97% passing with this change.
TEST=Local testing.
Change-Id: I2f2f1b0926845134578f08d073ed7606f1fc4173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490320
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Prior to this change, the VM service isolate was configured to execute
`main` directly. This resulted in unexpected behavior around exceptions
thrown after the first asynchronous gap, which were unhandled but caused
the service isolate to exit silently with no error.
This change updates how the service isolate starts execution by
invoking `main` via `dart:isolate`'s `_runMainIsolate` method, similar
to how user isolates and the DartDev isolate start execution. This
results in the message handler being triggered, meaning the microtask
queue will be processed correctly and unhandled exceptions in
asynchronous contexts being reported.
TEST=Local testing with exceptions explicitly thrown from within the VM
service
Change-Id: I69475a86d923489fa216bc8e939a2726cf3ff2e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Otherwise folks on ~latest bits from Flutter can't run pub!
Resolving dependencies in `/Users/kevmoo/github/dart/sdk`...
The current Dart SDK version is 3.12.0-261.0.dev.
Because dart_runtime_service_vm requires SDK version ^3.12.0-edge, version solving failed.
Change-Id: I76af81c9f6d9360a347300a1b8bac479ee45c631
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489640
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This change adds support for invoking RPCs via HTTP requests, allowing
for interacting with the service without needing to establish a web
socket connection.
This change also adds support for the development file system, otherwise
known as DevFS. DevFS is a (currently) undocumented feature provided by
the VM service that gives clients limited file system access within a
directory contained in the system's temp directory. This is currently
used by Flutter to push kernel files to the device when performing a hot
reload.
The DevFS implementation for package:dart_runtime_service_vm removes
the long deprecated support for `path` parameters, leaving `uri`s as
the only supported format for specifying file system types. Existing
DevFS tests have been updated to replace `path` with `uri` in
preparation for dart_runtime_service_vm becoming the new default VM
service.
This change brings the package:vm_service test suite pass rate to ~95%.
Change-Id: Ib7d95db5788c37408d3dec79926ca7206660a43f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488280
Reviewed-by: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change adds initial support for working with isolates in the Dart
Runtime Service and its backends.
The new `IsolateManager` base class tracks the set of active isolates
and their lifecycle events. The `VmIsolateManager` extends this class,
adding support specific to interacting with isolates within the Dart VM.
TEST=vm/cc/DartAPI_InvokeVMServiceMethod*_Exp
Change-Id: I3dfa298722c40dbdfdd58105cc78f31d058dd7a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486560
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
This change includes an initial implementation of the new VM service
implementation based on `package:dart_runtime_service`, along with the
necessary plumbing to start it in place of the legacy VM service
implementation.
The entrypoint for the new VM service implementation is located in
dart_runtime_service_vm/bin/vm_service_entrypoint.dart, which is
compiled into AppJIT and AOT snapshots when the
`--include-experimental-vm-service` flag is provided to `build.py`. To run
the VM with the new VM service implementation, the
`--experimental-vm-service` flag must be provided.
Currently, the experimental VM service implementation supports:
- User specified ports
- Authentication code flags
- Enabling the HTTP server via SIGQUIT
- Some service protocol RPCs that don't require an isolate ID (e.g.,
`getVM`)
See go/dart-runtime-services-unification for more details.
TEST=Manual
CoreLibraryReviewExempt: dart:_vmservice is private
Change-Id: I4a58cd1fa0a386313baa3d5c5345720231279123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484820
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>