flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.58k stars 324 forks source link

Wire up the analyzer server to the devtools client #70

Open jacob314 opened 5 years ago

jacob314 commented 5 years ago

There are cases such as displaying doc comments, autocompleting expressions, and getting types where having access to the analyzer service is needed.

TBD: the most robust way to wire up the analyzer to the web app. IDEs such as VSCode already have an analyzer service running but command line users do not.

devoncarew commented 5 years ago

We could use the service protocol as an intermediary layer here. The service protocol has a way for clients to register services (_registerService), and other clients can then invoke them. flutter_tools currently exposes hot reload as a service this way - a web based client can invoke hot reload in a running flutter app by calling this service.

So an IDE could register a 'getAnalyzer' service, or flutter_tools could as well. The analysis server is not designed to have more than one client, so we may want either a separate analysis server process, or to expose very specific functionality over the service protocol (doc comments, code completion, ...).

jacob314 commented 5 years ago

using the service protocol as an intermediary layer makes sense.