Skip to content

Commit 6d6fdc1

Browse files
srawlinsCommit Queue
authored andcommitted
DAS plugins: bump analysis_server_plugin to 0.2.0
Change-Id: I0022c19ffbb30066087abc1005923ef558c9fdfb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441081 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent d3d14f8 commit 6d6fdc1

File tree

2 files changed

+54
-5
lines changed

2 files changed

+54
-5
lines changed

pkg/analysis_server_plugin/CHANGELOG.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,55 @@
1-
## 0.2.0-dev
1+
## 0.2.0
22

3-
- Require version `7.4.x` of the `analyzer` package.
3+
- Require version `^8.0.0` of the `analyzer` package.
4+
- Require Dart SDK version `^3.5.0`.
5+
- Plugins can now register assists. See the [documentation][writing assists]
6+
for details.
7+
- With the initial release of the new `analyzer_testing` package, there is now
8+
a framework for testing analysis rules. See the
9+
[documentation][testing_rules] for details.
10+
- Added documentation for several features:
11+
- [writing fixes][]
12+
- [writing assists][]
13+
- [enabling lint rules][]
14+
- Require that CorrectionProducers registered as fixes have a non-`null`
15+
`fixKind`, and that CorrectionProducers registered as assists have a
16+
non-`null` `assistKind`.
17+
- Various performance improvements are included.
18+
- Breaking change: The `DartFixContext.librariesWithExtensions` method now
19+
accepts a `Name` instead of a `String`, and only yields library elements that
20+
actually export an extension with a member of the given name.
21+
- `CorrectionProducer.errorLength` is renamed
22+
`CorrectionProducer.diagnosticLength`.
23+
- `CorrectionProducer.errorOffset` is renamed
24+
`CorrectionProducer.diagnosticOffset`.
25+
- `FixContext.error` is renamed `FixContext.diagnostic`.
26+
- The new minimum analyzer version contains a number of API changes that should
27+
be noted for use in this package:
28+
- `ErrorCode` is renamed `DiagnosticCode`.
29+
- `AnalysisError` is renamed `Diagnostic`. This class's `errorCode` field is
30+
now named `diagnosticCode`.
31+
- `ErrorListener` is renamed `DiagnosticListener`.
32+
- `ErrorReporter` is renamed `DiagnosticReporter`.
33+
- `LintRule` is split into two classses: `AnalysisRule`, for rules which
34+
report exactly one code, and `MultiAnalysisRule`, for rules which report
35+
multiple codes. These classes are public API. Classes that used to extend
36+
`LintRule` and either implemented the `lintCode` getter or the `lintCodes`
37+
getter now must implement `diagnosticCode` (for `AnalysisRule`) or
38+
`diagnosticCodes` (for `MultiAnalysisRule`).
39+
- `NodeLintRegistry` is renamed `RuleVisitorRegistry`. It is now public API.
40+
- A `LintCode`'s severity can now be specified when in the constructor call.
41+
- `LinterContext` is renamed `RuleContext`. It is now public API.
42+
- `LinterContextWithParsedResults` is renamed `RuleContextWithParsedResults`.
43+
- `LinterContextWithResolvedResults` is renamed
44+
`RuleContextWithResolvedResults`.
45+
- `LintRuleUnitContext` is renamed `RuleUnitContext`. It is now public API.
46+
- `CorrectionProducer.inheritanceManager` is deprecated, in favor of the
47+
methods found on `InterfaceElement`.
48+
49+
[testing_rules]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/testing_rules.md
50+
[writing fixes]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/writing_fixes.md
51+
[writing assists]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/writing_assists.md
52+
[enabling lint rules]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/using_plugins.md#enabling-a-lint-rule
453

554
## 0.1.0-dev.1
655

pkg/analysis_server_plugin/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: analysis_server_plugin
22
description: A framework and support code for building plugins for the analysis server.
3-
version: 0.2.0-dev
3+
version: 0.2.0
44
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server_plugin
55

66
environment:
@@ -11,8 +11,8 @@ resolution: workspace
1111
dependencies:
1212
# See the release policy for managing this dependency at
1313
# pkg/analyzer/doc/implementation/releasing.md.
14-
analyzer: ^8.0.0-0
15-
analyzer_plugin: ^0.13.0
14+
analyzer: ^8.0.0
15+
analyzer_plugin: ^0.13.2
1616
meta: ^1.16.0
1717
yaml: ^3.1.0
1818
yaml_edit: ^2.2.0

0 commit comments

Comments
 (0)