dart-sdk/pkg/analysis_server
Martin Kustermann 81df36216f Make utf8.encode() have Uint8List return type
Right now `utf8.encode()` has a static return type of `List<int>`
due to extending `Encoding` (which extends `Codec<String, List<int>>`).

We cannot easily change `Encoding` to extend `Codec<String, Uint8List>`
because that would also change `utf8.decode()` to require `Uint8List`
which would be a breaking change.

So instead we override `utf8.encode()` to have more precise return type.

Some parts of our SDK are run using the checked-in SDK, so it cannot
rely on the changed return type yet (until checked-in SDK is rolled).

So we use `const Utf8Encoder().convert()` as a temporary change, as
that already has `Uint8List` return type.

Issue https://github.com/dart-lang/sdk/issues/52801

TEST=ci

CoreLibraryReviewExempt: More precise return type for existing API
Change-Id: I2861d1f0eb3d292d8e3ec8437c0d441a2d2bd193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254903
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-07-11 08:54:33 +00:00
..
benchmark [analyzer] Make benchmark report memory usage in bytes to make golem happy 2023-06-20 06:07:48 +00:00
bin
doc [analyzer] minor updates to the quick_fix.md documentation 2023-05-18 18:53:39 +00:00
lib Start converting portions of the KeywordContributor 2023-07-10 19:51:33 +00:00
test Make utf8.encode() have Uint8List return type 2023-07-11 08:54:33 +00:00
tool Deprecate ExecutableElement.returnType, use returnType2 instead. 2023-06-29 23:16:59 +00:00
analysis_options.yaml Ignore TODO in pkg/analyzer and pkg/analysis_server. 2023-04-21 19:16:04 +00:00
AUTHORS
CHANGELOG.md
CONTRIBUTING.md
LICENSE
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml Add auto-snapshotting and usage reporting. 2023-05-22 18:00:26 +00:00
README.md

analysis_server

A long-running process that provides analysis results to other tools.

The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.

Using the server

The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.

Clients (typically tools, such as an editor) are expected to run the analysis server in a separate process and communicate with it using a JSON protocol. The original protocol is specified in the file analysis_server/doc/api.html and Language Server Protocol support is documented in tool/lsp_spec/README.md.

Features and bugs

Please file feature requests and bugs at the issue tracker.