diff --git a/CHANGELOG.md b/CHANGELOG.md index 571d5107fe9..00ab3a1bd7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -229,6 +229,11 @@ ### Tools +#### Observatory +- Observatory is no longer served by default and users should instead use Dart + DevTools. Users requiring specific functionality in Observatory should set + the `--serve-observatory` flag. + #### Web Dev Compiler (DDC) - Removed deprecated command line flags `-k`, `--kernel`, and `--dart-sdk`. - The compile time flag `--nativeNonNullAsserts`, which ensures web library APIs diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart index 5a7b5ce6fef..a5101b9269a 100644 --- a/pkg/dartdev/test/commands/run_test.dart +++ b/pkg/dartdev/test/commands/run_test.dart @@ -632,7 +632,7 @@ void main(List args) => print("$b $args"); '--enable-vm-service=0', if (!withDds) '--no-dds', if (!enableAuthCodes) '--disable-service-auth-codes', - if (!serve) '--no-serve-observatory', + if (serve) '--serve-observatory', p.relativeFilePath, ]); diff --git a/runtime/bin/main_impl.cc b/runtime/bin/main_impl.cc index aab27b9d187..d2c4fd14c5f 100644 --- a/runtime/bin/main_impl.cc +++ b/runtime/bin/main_impl.cc @@ -558,7 +558,7 @@ static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri, Options::vm_service_auth_disabled(), Options::vm_write_service_info_filename(), Options::trace_loading(), Options::deterministic(), Options::enable_service_port_fallback(), - wait_for_dds_to_advertise_service, !Options::disable_observatory())) { + wait_for_dds_to_advertise_service, Options::enable_observatory())) { *error = Utils::StrDup(VmService::GetErrorMessage()); return nullptr; } diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h index 8cfcfcd89b3..895c61ad1df 100644 --- a/runtime/bin/main_options.h +++ b/runtime/bin/main_options.h @@ -49,7 +49,8 @@ namespace bin { V(bypass_trusting_system_roots, bypass_trusting_system_roots) \ V(delayed_filewatch_callback, delayed_filewatch_callback) \ V(mark_main_isolate_as_system_isolate, mark_main_isolate_as_system_isolate) \ - V(no_serve_observatory, disable_observatory) + V(no_serve_observatory, disable_observatory) \ + V(serve_observatory, enable_observatory) // Boolean flags that have a short form. #define SHORT_BOOL_OPTIONS_LIST(V) \ diff --git a/sdk/lib/_internal/vm/bin/vmservice_io.dart b/sdk/lib/_internal/vm/bin/vmservice_io.dart index 0b1c6aea770..668734fca12 100644 --- a/sdk/lib/_internal/vm/bin/vmservice_io.dart +++ b/sdk/lib/_internal/vm/bin/vmservice_io.dart @@ -40,7 +40,7 @@ bool _enableServicePortFallback = false; @pragma("vm:entry-point") bool _waitForDdsToAdvertiseService = false; @pragma("vm:entry-point", !const bool.fromEnvironment('dart.vm.product')) -bool _serveObservatory = true; +bool _serveObservatory = false; // HTTP server. Server? server;