dart-sdk/pkg/analysis_server_client
Brian Wilkerson 9db372e6f4 Make Location.endLine and Location.endColumn optional fields in the protocol
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.

This CL makes those fields optional in order to fix the deserialization
issue.

Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.

We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.

Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-15 17:35:55 +00:00
..
example Migrate more of analysis_server_client 2021-04-02 23:36:52 +00:00
lib Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
test Rename AnalysisSession.getXyz2() into getXyz(). 2021-07-12 22:42:58 +00:00
analysis_options.yaml enable depend_on_referenced_packages 2021-06-04 14:19:08 +00:00
CHANGELOG.md Switch analysis_server_client to language 2.12, so null safety, but opt-out files. 2021-03-31 03:34:22 +00:00
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
pubspec.yaml Switch analysis_server_client to language 2.12, so null safety, but opt-out files. 2021-03-31 03:34:22 +00:00
README.md Fix a typo. 2018-11-15 18:45:09 +00:00

analysis_server_client

analysis_server_client is a client wrapper over Analysis Server.

Overview

  • Instances of Server manage a connection to an analysis server process, and facilitate communication to and from the server.

  • The Protocol library provides constants and classes to build requests for the server and decode responses and notifications from the server.

Example

The example uses the Server to launch the analysis server, analyze all *.dart files in the specified directory, display the results, and shutdown the analysis server.

References

For more about the analysis server, see the Analysis Server page.