sdk
sdk copied to clipboard
[ Breaking Change Request ] Remove Observatory from the Dart VM
The Observatory developer tooling was developed during the early days of the Dart project to allow for developers to debug, dive into CPU and memory performance characteristics, and inspect program structure of Dart programs. This tool was developed and maintained solely by Dart VM engineers without much input from UX designers, making it powerful for Dart SDK developers but difficult to use by the average Dart developer.
With the development of Dart DevTools by a dedicated team, it no longer makes sense to continue work on Observatory with the associated compatibility and maintenance burdens, especially now that Dart DevTools is at near feature parity with Observatory.
Impact:
Pre-Dart 3.0, users wishing to continue using Observatory will need to pass an --enable-observatory flag for Observatory to be served by the VM. For Dart 3.0, this flag will be removed and remaining Observatory users will be required to move to the new Dart DevTools developer tooling.
Dart DevTools is at near feature parity with Observatory and should meet the needs of the vast majority of Dart developers. Any missing functionality in DevTools that's critical to an individual's workflow should be documented in a new issue on the DevTools issue tracker.
Proposal:
- Pre-Dart 3.0: place Observatory behind
--enable-observatory, making Observatory disabled by default by still available. - Dart 3.0: remove the
--enable-observatoryflag and remove Observatory completely from the SDK.
cc @a-siva @kenzieschmoll @mit-mit
//cc @zanderso
The --enable-observatory flag should be made available before it is required. This is so that we can make changes to pass the flag without losing access to the Observatory.
The
--enable-observatoryflag should be made available before it is required. This is so that we can make changes to pass the flag without losing access to the Observatory.
SGTM.
CL adding support for --[no-]serve-observatory is up for review. Default behavior currently is to implicitly set --serve-observatory.
@vsmenon @Hixie @grouma @zanderso it seems like the comments here have been addressed by @bkonyi . How do we feel about this breaking change request?
I'm not sure the timeline is achievable, but otherwise the plan sgtm. I also added https://github.com/flutter/devtools/issues/4711 to the tracker.
lgtm with the caveat that the performance of devtools is acceptable to the engineers who currently use observatory
lgtm
@bkonyi do you find you have enough time to implement this?
The initial work needed to allow for disabling Observatory by default is already up for review. Once that change lands and flutter_tools has the right plumbing for --serve-observatory, we can go ahead and change the default behavior to not serve Observatory.
Thanks @bkonyi, only thing left to address here is the comment by @a-siva.
@bkonyi --serve-observatory needs to be a flag that the Engine can pass to Dart_SetVMFlags. Is that what your change did?
@bkonyi
--serve-observatoryneeds to be a flag that the Engine can pass toDart_SetVMFlags. Is that what your change did?
@zanderso I think we'll just need to make a change here in the engine to allow for this option to be set.
@bkonyi That sounds plausible to me, but you'd be the expert on where and when the new flag needs to be set in the service isolate code.
Many gaps in functionality between Observatory and DevTools are filed under this tag
Sorry for my ignorance, will we also remove the --observe= flag?
@bkonyi and @rmacnak-google are we planning on keeping this open until all issues in this tag are resolved?
@bkonyi and @rmacnak-google are we planning on keeping this open until all issues in this tag are resolved?
I don't know if we'll end up porting everything under that tag as some of the functionality isn't critical / widely used, so we'll need to make a judgement call at some point.
Sorry for my ignorance, will we also remove the --observe= flag?
@srawlins definitely not :-)
CL to disable serving Observatory by default is up for review.
Thanks @bkonyi.
CC: @XilaiZhang and @caseyhillers as this may impact flutter rolls.
@bkonyi looks like this landed, but got reverted?
@mit-mit that's correct. We were having issues getting this landed among all the other breaking changes and it was decided this was lower priority to get into 3.0. We're going to target the next stable release instead.
OK, thanks
@bkonyi is this still something we are considering?
It is, there's just a long tail of issues that we're working through. We've already disabled Observatory by default in the SDK and Flutter, so the actual work to remove Observatory should hopefully happen in the next few quarters.
While I was aware of the intent to direct Dart developers to use DevTools instead of Observatory I didn't realise there was also the intent to completely remove the Observatory 😞
@mit-mit What is the recommendation for developers wanting to use functionality that was previously in Observatory that is not available in DevTools in the "VMTools" tab with "VM Developer Mode" enabled?
And given this has happened, why on earth is the above labelling used in DevTools?? I am pretty sure I am not doing any "VM development" yet I find it very necessary to use the tooling that is still available for Isolates in my Dart cli app project that involves using Isolates heavily.
@maks please file feature request issues for what functionality you are missing, describing the use case you would use them for.
@mit-mit What is the recommendation for developers wanting to use functionality that was previously in Observatory that is not available in DevTools in the "VMTools" tab with "VM Developer Mode" enabled?
And given this has happened, why on earth is the above labelling used in DevTools?? I am pretty sure I am not doing any "VM development" yet I find it very necessary to use the tooling that is still available for Isolates in my Dart cli app project that involves using Isolates heavily.
@maks We went with "VM Developer Mode" since the vast majority of the features behind that flag are only relevant to individuals working on the Dart VM. As Michael suggested, if there's any features that you use in Observatory that haven't been migrated to DevTools, please file an issue in the DevTools repo describing the feature (screenshots from Observatory would be very helpful!) and how you use it in your workflow. Feel free to cc me on the issue.
Also, if you need access to Observatory for tooling that isn't available in DevTools yet, you can either pass --serve-observatory to dart or navigate to http://<vm_service_uri>/_serveObservatory to enable Observatory.
Checking in again with @Hixie @vsmenon and @grouma for this breaking change.
I'm a bit confused as to what is being proposed here. Are --enable-observatory and --serve-observatory different? Does this actually remove observatory or will it still be there but less accessible?