mirror of
https://github.com/dart-lang/sdk
synced 2024-10-01 19:29:09 +00:00
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>
This commit is contained in:
parent
28b9898433
commit
9f5246e8c6
|
@ -551,19 +551,12 @@ class Server {
|
|||
|
||||
// Guard against lines like:
|
||||
// {"event":"server.connected","params":{...}}The Dart VM service is listening on ...
|
||||
const dartVMServiceMessage = 'The Dart VM service is listening on ';
|
||||
var dartVMServiceMessage = 'The Dart VM service is listening on ';
|
||||
if (trimmedLine.contains(dartVMServiceMessage)) {
|
||||
trimmedLine = trimmedLine
|
||||
.substring(0, trimmedLine.indexOf(dartVMServiceMessage))
|
||||
.trim();
|
||||
}
|
||||
const devtoolsMessage =
|
||||
'The Dart DevTools debugger and profiler is available at:';
|
||||
if (trimmedLine.contains(devtoolsMessage)) {
|
||||
trimmedLine = trimmedLine
|
||||
.substring(0, trimmedLine.indexOf(devtoolsMessage))
|
||||
.trim();
|
||||
}
|
||||
if (trimmedLine.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ Future<void> main() async {
|
|||
}) async {
|
||||
targetProjectInstance = await targetProject.start(
|
||||
[
|
||||
'--no-dds',
|
||||
'--disable-dart-dev',
|
||||
'--observe=0',
|
||||
if (disableServiceAuthCodes) '--disable-service-auth-codes',
|
||||
targetProject.relativeFilePath,
|
||||
|
|
|
@ -44,7 +44,7 @@ Future<io.Process> spawnDartProcess(
|
|||
final serviceInfoFile = await io.File.fromUri(serviceInfoUri).create();
|
||||
|
||||
final arguments = [
|
||||
'--no-dds',
|
||||
'--disable-dart-dev',
|
||||
'--observe=0',
|
||||
if (!serveObservatory) '--no-serve-observatory',
|
||||
if (pauseOnStart) '--pause-isolates-on-start',
|
||||
|
|
|
@ -95,7 +95,9 @@ abstract class TestCase {
|
|||
'--enable-vm-service=0', // Note: use 0 to avoid port collisions.
|
||||
'--pause_isolates_on_start',
|
||||
'--disable-service-auth-codes',
|
||||
'--no-dds',
|
||||
// TODO(bkonyi): The service isolate starts before DartDev has a chance
|
||||
// to spawn DDS. We should suppress the Observatory message until DDS
|
||||
// starts (#42727).
|
||||
'--disable-dart-dev',
|
||||
outputUri.toFilePath()
|
||||
];
|
||||
|
|
|
@ -503,6 +503,7 @@ main() {
|
|||
"--pause-isolates-on-exit",
|
||||
"--enable-vm-service:0",
|
||||
"--disable-service-auth-codes",
|
||||
"--disable-dart-dev",
|
||||
list.path
|
||||
]);
|
||||
|
||||
|
@ -606,6 +607,7 @@ main() {
|
|||
"--pause-isolates-on-exit",
|
||||
"--enable-vm-service:0",
|
||||
"--disable-service-auth-codes",
|
||||
"--disable-dart-dev",
|
||||
list.path
|
||||
]);
|
||||
|
||||
|
@ -871,6 +873,7 @@ main() {
|
|||
"--pause-isolates-on-exit",
|
||||
"--enable-vm-service:0",
|
||||
"--disable-service-auth-codes",
|
||||
"--disable-dart-dev",
|
||||
list.path
|
||||
]);
|
||||
|
||||
|
@ -952,6 +955,7 @@ main() {
|
|||
'--enable-vm-service=0', // Note: use 0 to avoid port collisions.
|
||||
'--pause_isolates_on_start',
|
||||
'--disable-service-auth-codes',
|
||||
'--disable-dart-dev',
|
||||
outputFile.path
|
||||
];
|
||||
final vm = await Process.start(Platform.resolvedExecutable, vmArgs);
|
||||
|
@ -1359,6 +1363,7 @@ main() {
|
|||
"--pause-isolates-on-start",
|
||||
"--enable-vm-service:0",
|
||||
"--disable-service-auth-codes",
|
||||
"--disable-dart-dev",
|
||||
scriptOrDill.path
|
||||
]);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Future<(Process, Uri)> spawnDartProcess(
|
|||
final serviceInfoFile = await File.fromUri(serviceInfoUri).create();
|
||||
|
||||
final arguments = [
|
||||
'--no-dds',
|
||||
'--disable-dart-dev',
|
||||
'--observe=0',
|
||||
if (!serveObservatory) '--no-serve-observatory',
|
||||
if (pauseOnStart) '--pause-isolates-on-start',
|
||||
|
|
|
@ -7,10 +7,22 @@ import 'package:vm_service/vm_service.dart';
|
|||
|
||||
import 'common/test_helper.dart';
|
||||
|
||||
VMTest expectedProtocolTest(List<String> expectedProtocols) =>
|
||||
/// [expectMissingProtocol] allows for a single protocol to be missing. See
|
||||
/// https://github.com/dart-lang/sdk/issues/54835 for context. This test will
|
||||
/// fail without this flag on AOT configurations when DDS is expected since DDS
|
||||
/// isn't currently setup to run with dart_precompiled_runtime. This flag is
|
||||
/// meant to cause this test to fail if
|
||||
/// https://github.com/dart-lang/sdk/issues/54841 is resolved so this test can
|
||||
/// be updated.
|
||||
VMTest expectedProtocolTest(
|
||||
List<String> expectedProtocols, {
|
||||
bool expectMissingProtocol = false,
|
||||
}) =>
|
||||
(VmService service) async {
|
||||
final protocols = (await service.getSupportedProtocols()).protocols!;
|
||||
expect(protocols.length, expectedProtocols.length);
|
||||
final expectedLength =
|
||||
expectedProtocols.length - (expectMissingProtocol ? 1 : 0);
|
||||
expect(protocols.length, expectedLength);
|
||||
for (final protocol in protocols) {
|
||||
expect(expectedProtocols.contains(protocol.protocolName), true);
|
||||
expect(protocol.minor, greaterThanOrEqualTo(0));
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'common/test_helper.dart';
|
||||
import 'get_supported_protocols_common.dart';
|
||||
|
||||
|
@ -11,6 +13,9 @@ final tests = <VMTest>[
|
|||
'VM Service',
|
||||
'DDS',
|
||||
],
|
||||
// See https://github.com/dart-lang/sdk/issues/54841
|
||||
expectMissingProtocol:
|
||||
Platform.script.toString().endsWith('out.aotsnapshot'),
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
@ -54,10 +54,7 @@ void main() {
|
|||
],
|
||||
);
|
||||
final service = await vmServiceConnectUri(wsUri.toString());
|
||||
VM vm;
|
||||
do {
|
||||
vm = await service.getVM();
|
||||
} while (vm.isolates!.isEmpty);
|
||||
final vm = await service.getVM();
|
||||
final isolate = vm.isolates!.first;
|
||||
final errorCompleter = Completer<RPCError>();
|
||||
final stackTraceCompleter = Completer<StackTrace>();
|
||||
|
|
|
@ -557,8 +557,11 @@ static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
|
|||
result = Dart_SetDeferredLoadHandler(Loader::DeferredLoadHandler);
|
||||
CHECK_RESULT(result);
|
||||
|
||||
// We do not spawn the external dds process if DDS is explicitly disabled.
|
||||
bool wait_for_dds_to_advertise_service = !Options::disable_dds();
|
||||
// We do not spawn the external dds process in the following scenarios:
|
||||
// - The DartDev CLI is disabled and VM service is enabled.
|
||||
// - DDS is disabled.
|
||||
bool wait_for_dds_to_advertise_service =
|
||||
!(Options::disable_dart_dev() || Options::disable_dds());
|
||||
bool serve_devtools =
|
||||
Options::enable_devtools() || !Options::disable_devtools();
|
||||
// Load embedder specific bits and return.
|
||||
|
|
|
@ -127,7 +127,7 @@ Future<Reloader> launchOn(String file, {bool verbose = false}) async {
|
|||
if (verbose) '--trace-reload',
|
||||
if (verbose) '--trace-reload-verbose',
|
||||
'--enable-vm-service:0',
|
||||
'--no-dds',
|
||||
'--disable-dart-dev',
|
||||
'--disable-service-auth-codes',
|
||||
file
|
||||
];
|
||||
|
|
|
@ -30,7 +30,6 @@ class Testee {
|
|||
final processArgs = [
|
||||
...Platform.executableArguments,
|
||||
'--disable-dart-dev',
|
||||
'--no-dds',
|
||||
'--disable-service-auth-codes',
|
||||
'--enable-vm-service:0',
|
||||
'--pause-isolates-on-exit',
|
||||
|
|
Loading…
Reference in a new issue