Skip to content

Commit dbeceb1

Browse files
committed
[ VM / Service ] Pulled in vm_service_drivers from its own repo.
- Updated various paths to point to the sdk repo instead of the vm_service_drivers repo. - Updated generate.dart to use the service.md from the SDK, not a copy. - Removed hidden files that are no longer needed. Change-Id: I11b1f2e32d55f1fdaaa6eb9ce34fc318716c36f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109120 Reviewed-by: Devon Carew <[email protected]> Commit-Queue: Ben Konyi <[email protected]>
1 parent 76f82bd commit dbeceb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+15310
-0
lines changed

.packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ typed_data:third_party/pkg/typed_data/lib
104104
unittest:third_party/pkg/unittest/lib
105105
usage:third_party/pkg/usage/lib
106106
vm:pkg/vm/lib
107+
vm_service:pkg/vm_service/lib
107108
watcher:third_party/pkg/watcher/lib
108109
web_components:third_party/pkg/web_components/lib
109110
web_socket_channel:third_party/pkg/web_socket_channel/lib

pkg/vm_service/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.iml
2+
.dart_tool
3+
.packages
4+
pubspec.lock

pkg/vm_service/CHANGELOG.md

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
# Changelog
2+
3+
## 1.0.0
4+
- Migrated `vm_service_lib` into the Dart SDK.
5+
- Renamed from `package:vm_service_lib` to `package:vm_service`.
6+
- Switched versioning system to follow semantic versioning standards instead of
7+
pinning versions to match the service protocol version.
8+
9+
## 3.22.2
10+
- Fix `registerService` RPC and `Service` stream not being handled correctly.
11+
- Fixed failing tests.
12+
13+
## 3.22.1
14+
- **breaking**: Changed type of `library` property in `Class` objects from
15+
`ObjectRef` to `LibraryRef`.
16+
17+
## 3.22.0
18+
- The `registerService` RPC and `Service` stream are now public.
19+
- `Event` has been updated to include the optional `service`, `method`, and
20+
`alias` properties.
21+
22+
## 3.21.1
23+
- **breaking**: Fixed issue where an `InstanceRef` of type `null` could be returned
24+
instead of null for non-`InstanceRef` properties and return values. As a
25+
result, some property and return types have been changed from Obj to their
26+
correct types.
27+
28+
## 3.21.0
29+
- support service protocol version 3.21
30+
31+
## 3.20.0+2
32+
- allow optional params in `getVMTimeline`
33+
34+
## 3.20.0+1
35+
- handle null isolate ids in `callServiceExtension`
36+
- add backwards compatibility for `InstanceSet` and `AllocationProfile`
37+
38+
## 3.20.0
39+
- rev to 3.20.0; expose public methods added in 3.17 - 3.20 VM Service Protocol versions
40+
41+
## 3.17.0+1
42+
- generate a list of available event streams
43+
44+
## 3.17.0
45+
- rev to 3.17.0; expose the Logging event and the getMemoryUsage call
46+
47+
## 3.15.1+2
48+
- fix handling of errors in registered service callbacks to return valid
49+
JSON-RPC errors and avoid the client getting "Service Disappeared" responses
50+
51+
## 3.15.1+1
52+
- rename `getVmWsUriFromObservatoryUri` to `convertToWebSocketUrl`
53+
- fix an assignment issue in `evaluate`
54+
55+
## 3.15.1
56+
- Add `getVmWsUriFromObservatoryUri`, a helper function to convert observatory URIs
57+
into the required WebSocket URI for connecting to the VM service.
58+
59+
## 3.15.0
60+
- support service protocol version 3.15
61+
- fix an issue decoding null `Script.tokenPosTable` values
62+
63+
## 3.14.3-dev.4
64+
- Add support for the `_Service` stream in the `VmServerConnection` directly.
65+
66+
## 3.14.3-dev.3
67+
- Add support for automatically delegating service extension requests to the
68+
client which registered them.
69+
- This is only for services that are registered via the vm service protocol,
70+
services registered through `dart:developer` should be handled by the
71+
`VmServiceInterface` implementation (which should invoke the registered
72+
callback directly).
73+
- Added a `ServiceExtensionRegistry` class, which tracks which clients have
74+
registered which service extensions.
75+
- **breaking**: Renamed `VmServer` to `VmServerConnection`.
76+
- One `VmServerConnection` should be created _per client_ connection to the
77+
server. These should typically all share the same underlying
78+
`VmServiceInterface` instance, as well as the same
79+
`ServiceExtensionRegistry` instance.
80+
81+
## 3.14.3-dev.2
82+
- Add `callServiceExtension` method to the `VmServiceInterface` class.
83+
- The `VmServer` will delegate all requests whose methods start with `ext.` to
84+
that implementation.
85+
86+
## 3.14.3-dev.1
87+
- Add `VmServiceInterface` and `VmServer` classes, which can handle routing
88+
jsonrpc2 requests to a `VmServiceInterface` instance, and serializing the
89+
responses back.
90+
91+
## 3.14.3-dev.0
92+
- Add `toJson` methods to all classes.
93+
94+
## 3.14.2
95+
- fix code generation for the `getSourceReport` call
96+
97+
## 3.14.1
98+
- address an encoding issue with stdout / stderr text
99+
100+
## 3.14.0
101+
- regenerate for `v3.14`
102+
- bump to a major version numbering scheme
103+
104+
## 0.3.10+2
105+
- work around an issue de-serializing Instance.closureContext
106+
107+
## 0.3.10+1
108+
- fix an issue de-serializing some object types
109+
110+
## 0.3.10
111+
- regenerate for `v3.12`
112+
- expose `isolate.getScripts()`
113+
- expose `isolate.getInstances()`
114+
115+
## 0.3.9+2
116+
- handle nulls for `Script.source`
117+
- fix a decoding issue for `Script.tokenPosTable`
118+
119+
## 0.3.9+1
120+
- rev to version `3.9` of the spec
121+
- expose `invoke`
122+
123+
## 0.3.9
124+
- Rename the `Null` type to `NullVal`
125+
126+
## 0.3.8
127+
- upgrades for Dart 2 dependencies
128+
129+
## 0.3.7
130+
- ensure the library works with Dart 2
131+
- regenerate the library based on the 3.8-dev spec
132+
- now require a minimum of a 2.0.0-dev Dart SDK
133+
- update to not use deprecated dart:convert constants
134+
135+
## 0.3.6
136+
- workaround for an issue with the type of @Library refs for VM objects
137+
138+
## 0.3.5+1
139+
- bug fix for deserializing `Instance` objects
140+
141+
## 0.3.5
142+
- improve access to the profiling APIs
143+
144+
## 0.3.4
145+
- more strong mode runtime fixes
146+
- expose some undocumented (and unsupported) service protocol methods
147+
148+
## 0.3.3
149+
- fix strong mode issues at runtime (with JSLists and Lists)
150+
- expose the ability to evaluate in the scope of another object
151+
- expose the async causal frame info
152+
- expose the `awaiterFrames` field
153+
- expose the `frameIndex` param for the step call
154+
155+
## 0.3.2+1
156+
- fix a strong mode issue in the generated Dart library
157+
158+
## 0.3.2
159+
- expose the `PausePostRequest` event
160+
161+
## 0.3.1
162+
- fix a parsing issue with ExtensionData
163+
164+
## 0.2.4
165+
- expose the service protocol timeline API
166+
- add the new `None` event type
167+
168+
## 0.2.3
169+
- include the name of the calling method in RPC errors
170+
171+
## 0.2.2
172+
- fixed several strong mode analysis issues
173+
174+
## 0.2.1
175+
- upgrade to service protocol version `3.3`
176+
177+
## 0.2.0
178+
- upgrade to service protocol version `3.2`
179+
180+
## 0.1.2
181+
- fixed a bug with the `ServiceExtensionAdded` event
182+
183+
## 0.1.1
184+
- expose the new 'Extension' event information
185+
186+
## 0.1.0
187+
- rev to 0.1.0; declare first stable API version
188+
189+
## 0.0.13
190+
- improve the toString() message for RPCError
191+
192+
## 0.0.12
193+
- bug fix for parsing MapAssociations
194+
195+
## 0.0.11
196+
- bug fix to the service extension API
197+
198+
## 0.0.10
199+
- expose a service extension API
200+
201+
## 0.0.9
202+
- update to the latest spec to capture the `Event.inspectee` field
203+
204+
## 0.0.8
205+
- allow listening to arbitrary event types
206+
- use Strings for the enum types (to allow for unknown enum values)
207+
208+
## 0.0.7
209+
- make the diagnostic logging synchronous
210+
- remove a workaround for a VM bug (fixed in 1.13.0-dev.7.3)
211+
- several strong mode fixes
212+
213+
## 0.0.6
214+
- added `exceptionPauseMode` to the Isolate class
215+
- added `hashCode` and `operator==` methods to classes supporting object identity
216+
- work around a VM bug with the `type` field of `BoundVariable` and `BoundField`
217+
218+
## 0.0.5
219+
- added more dartdocs
220+
- moved back to using Dart enums
221+
- changed from optional positional params to optional named params
222+
223+
## 0.0.4
224+
- enum redux
225+
226+
## 0.0.3
227+
- update to use a custom enum class
228+
- upgrade to the latest service protocol spec
229+
230+
## 0.0.2
231+
- added the `setExceptionPauseMode` method
232+
- fixed an issue with enum parsing
233+
234+
## 0.0.1
235+
- first publish
236+
- upgraded the library to the 3.0 version of the service protocol
237+
- upgraded the library to the 2.0 version of the service protocol
238+
- copied basic Dart API generator from Atom Dart Plugin
239+
https://github.com/dart-atom/dartlang/tree/master/tool
240+
- refactored Dart code to generate Java client as well as Dart client

pkg/vm_service/LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2015, the Dart project authors. All rights reserved.
2+
Redistribution and use in source and binary forms, with or without
3+
modification, are permitted provided that the following conditions are
4+
met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

pkg/vm_service/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# vm_service
2+
3+
[![pub package](https://img.shields.io/pub/v/vm_service.svg)](https://pub.dartlang.org/packages/vm_service)
4+
5+
A library to access the VM Service Protocol.
6+
7+
## Usage
8+
9+
See the
10+
[example](https://github.com/dart-lang/sdk/blob/master/pkg/vm_service/example/vm_service_tester.dart)
11+
for a simple use of the library's API.
12+
13+
The VM Service Protocol spec can be found at
14+
[github.com/dart-lang/sdk/runtime/vm/service/service.md](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md).
15+
16+
## Features and bugs
17+
18+
Please file feature requests and bugs at the [issue tracker][tracker].
19+
20+
[tracker]: https://github.com/dart-lang/sdk/issues
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include: package:pedantic/analysis_options.1.7.0.yaml
2+
3+
linter:
4+
rules:
5+
- directives_ordering
6+
- prefer_generic_function_type_aliases
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'dart:async';
6+
import 'dart:isolate';
7+
8+
main(List<String> args) async {
9+
var arr = newArray(5);
10+
var arr2 = newArray(417);
11+
var hash1 = newHash(5);
12+
var hash2 = newHash(417);
13+
14+
// ignore unused
15+
arr.length;
16+
arr2.length;
17+
hash1.length;
18+
hash2.length;
19+
20+
startIsolate(1);
21+
startIsolate(2);
22+
startIsolate(3);
23+
startIsolate(4);
24+
25+
await new Future.delayed(new Duration(seconds: 5));
26+
27+
print('at end of main...');
28+
}
29+
30+
void startIsolate(int val) {
31+
Isolate.spawn(isolateEntry, val);
32+
}
33+
34+
isolateEntry(message) async {
35+
print('starting $message');
36+
await new Future.delayed(new Duration(seconds: message));
37+
print('ending $message');
38+
}
39+
40+
List newArray(int length) {
41+
List l = [];
42+
for (int i = 0; i < length; i++) {
43+
l.add('entry_$i');
44+
}
45+
return l;
46+
}
47+
48+
Map newHash(int length) {
49+
Map m = {};
50+
for (int i = 0; i < length; i++) {
51+
m['entry_$i'] = i;
52+
}
53+
return m;
54+
}

0 commit comments

Comments
 (0)