Deprecate observatory field in JSON reporter and add a "vmService" equivalent
I'm working through removing some remaining references to Observatory in the VS Code extension (some of these things have been deprecated and new "VM Service" alternatives added) and noticed that one place we still have references is in the package:test JSON reporter:
https://github.com/dart-lang/test/blob/master/pkgs/test/doc/json_reporter.md
I guess it makes sense to add a new field for this (keeping the ld one as deprecated for some period, for compatibility). I think it's a trivial change and I'm happy to send a PR, but I wanted to check it was sensible first (and that just duplicating it as String? vmService and marking the other as deprecated in code and docs is the right direction).
The issue I think would be that technically this is a breaking change... other tools also read this field. We very rarely do breaking changes in this package, and need a really good justification for them.
I don't know if we really want to duplicate the fields for what could easily be many years?
Presumably it's only breaking when removing the original field?
I agree duplicating it for a long period isn't ideal, but it does seem fairly cheap and is presumably the only way to begin the process of removing the old field. It may seem odd years into the future if everyone has to keep using the name of a tool that no longer exists. Of course, it is also completely free to keep doing that and never breaks anyone.
You're better placed to make a call on this. If you think it's worthwhile but not a priority for you, I'm happy to send a PR. If you don't think it's worth doing, feel free to close :-)
If you don't think it's worth changing, that's probably fine. It's unfortunate that we used observatory in the first place, since it's not accurately describing what that URI is used for, which is connecting to the Dart VM Service. Once Observatory is removed, this messaging will be even more confusing.
At the very least, we should update the documentation for observatory to no longer reference Observatory instead of the VM Service.
Yeah I agree the name is confusing, I am just not sure if it is really worth going through the effort to change it. Removing the old field would be challenging I think, at least if we want to avoid breakage. We don't have any way really to notify clients that the field is deprecated.
cc @natebosch for thoughts, I don't feel super strongly, but it feels like we would more likely than not just be contributing extra tech debt by duplicating the field than just leaving the unfortunately named field.