In devtools, `VmService` is passed a stream from the
`web_socket_channel` library, which writes `Uint8List` values to the
stream. In these cases we don't need to copy the messages.
Change-Id: Iade3897370fb11b31e8f2894d64554b8b7e7d141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339123
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Once the flag for extension type support has been flipped on, the
analyzer will stop reporting `experiment_not_enabled` for this file,
and will instead be able to analyze it properly.
To avoid the `always_declare_return_types` warning when that happens,
the `<` operator needs a return type.
Change-Id: I76af290decf2ab480486c981ce1e1f17e44716c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337463
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This test would sometimes fail when trying to resume the main isolate in
the target program when it was not yet runnable. Waiting for the main
isolate to pause at start before resuming should fix this.
Change-Id: Ie242a222199a01e2c84d7c7be56376e616f9989e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336700
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
This test has been failing flakily on Windows because sometimes one of
the resolved URIs contains an uppercase drive letter and sometimes it
contains a lowercase one. This CL fixes this problem by doing a
case-insensitive check of that resolved URI on Windows, as paths on
Windows are case-insensitive.
TEST=CI
Fixes: https://github.com/dart-lang/sdk/issues/54034
Change-Id: I67379930baca938da12efe53d05f05284f71e325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
It was possible for the unawaited Futures in the results list to
complete with an error before they could be awaited, causing unhandled
exceptions to be thrown. Calling `ignore()` on each unawaited Future
should prevent this from happening.
Change-Id: Ia3123b206e395e3e6cb22004723d72dd5d3a5d22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335243
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
This test had a race condition where `test()` in the spawned isolate could be
invoked before the deferred library had finished loading. This change
updates the testee logic to wait for the spawned isolate to send a
message over a port indicating that the deferred library has been
loaded. Once the spawner has been notified that the deferred library has
been loaded, it then pauses at a `debugger()` call, indicating to the
tester that it can start running the test logic.
Change-Id: I56373f775f00a71ea13e65e4594b6cf8dd6ca00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335081
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
The `stoppedAtLine(LINE_C)` check would sometimes fail as the resume
event hadn't yet been processed. We need to wait for a
`hasStoppedAtBreakpoint` to finish before we can execute
`stoppedAtLine(...)` calls.
Change-Id: I7c5bf3a79d4ab1597622e00867969fbcca68f699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335001
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Also:
- added some missing RPC error kinds to `RPCErrorKind`
- started making use of `update_line_numbers.dart` to automatically fix
line numbers in service tests. Will go back through the existing
tests to update them to use this script in a future CL.
Change-Id: I99a443ca59429eec829e5f289c0f396562cde89b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333980
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change includes:
- Removal of deprecated methods and constants
- Removal of dependency on package:expect for testing, instead copying
over the minimal amount of functionality needed for testing from
package:expect into pkg/vm_service/test/common/expect.dart
- Removal of classes and interfaces that are now found in
package:vm_service_interface
Change-Id: I21c2d228e615f97e64dd98b6512bf2e533916454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331760
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
To reduce the headache associated with adding parameters to VM service
APIs, VmServiceInterface has been removed from package:vm_service and
pulled into its own dedicated package:vm_service_interface. This will
help reduce the need for major version bumps of package:vm_service,
which requires manual version bumps through >8 packages in order to make
the latest version available to flutter_tools and DevTools.
This separation of the VmService client from the interface will reduce
the frequency of major version bumps to `package:vm_service` as adding
optional parameters to existing APIs would cause implementers of the
interface to break.
package:vm_service continues to expose a copy of the contents of package:vm_service_interface to avoid breaking google3 rolls until package:dwds can migrate to package:vm_service_interface. package:vm_service will not be published until this copy is removed.
This change also includes:
- some code cleanup and modernization to both the code generator and
generated code
- >=3.0.0 SDK version requirement to allow for new language features
Change-Id: Ib1859c1b4e153fef7ee1f91e67e881bbf42652c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330500
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This CL also adds:
1. a method `vmServiceConnectUriWithCreator` helper alongside the existing `vmServiceConnectUri` helper. This method can create a generic `VmService` instance with the same logic as the existing `vmServiceConnectUri` helper. This was implemented this way so that it is not a breaking change to the existing helper.
2. a typedef `VmServiceCreator` for use in the `vmServiceConnectUriWithCreator` method and for shared use in packages that depend on `package:vm_service` (e.g. the DevTools packages)
3. a static method `VmService.defaultCreator` that provides a `VmServiceCreator` method for the `VmService` class.
The DevTools changes that are paired with this change are here: https://github.com/flutter/devtools/pull/6508.
Change-Id: I72d22e7d93d5aeba628bef630ae168eb7477ca6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Please prefer not to revert this change. Any tests that fail are release
blockers and need to be approved and urgently fixed forward. Dart 3.2
has already been cut and the version number must be updated. It is
acceptable for rolls to be blocked until the release blockers have been
resolved as P0 issues.
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.
Update dartdoc to a version that supports 3.3.
Change-Id: I1a19aa86e185c99e61374665f18cf24c498935a5
Tested: CQ
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329588
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.
Tested: CQ
Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
Reviewed-by: Alexander Thomas <athom@google.com>