analysis_server_lib 0.2.5 copy "analysis_server_lib: ^0.2.5" to clipboard
analysis_server_lib: ^0.2.5 copied to clipboard

A library to access Dart's analysis server API.

Buid status pub package

A library to access Dart's analysis server API.

What is the analysis server? #

The analysis server is a long-running process that provides analysis results to other tools. It is designed to provide on-going analysis of one or more code bases as those code bases are changing.

Using the server #

Clients (typically tools, such as an editor) are expected to run the analysis server in a separate process and communicate with it over a JSON protocol. The protocol is specified here.

Here's a simple example of starting and communicating with the server:

import 'package:analysis_server_lib/analysis_server_lib.dart';

void main() async {
  AnalysisServer server = await AnalysisServer.create();
  await server.server.onConnected.first;

  VersionResult version = await server.server.getVersion();
  print(version.version);
  
  server.dispose();
}
5
likes
140
points
3.12k
downloads

Publisher

verified publisherdevoncarew.org

Weekly Downloads

A library to access Dart's analysis server API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

logging, path

More

Packages that depend on analysis_server_lib