Commit 814c61d
[analyzer] Don't import generated error code files more than needed.
This change adds a `@Deprecated` annotation to each of the analyzer's
generated error code files, with a deprecation message that says the
corresponding non-code-generated file should be imported instead. For
example, `package:analyzer/src/error/codes.g.dart` now has a
deprecation message saying that
`package:analyzer/src/error/codes.dart` should be used instead.
All existing imports of these libraries are switched to the
corresponding non-code-generated file, where possible. (The only
circumstance in which it's not possible is when the corresponding
non-code-generated file imports the code-generated file---e.g., when
`package:analyzer/src/error/codes.dart` imports
`package:analyzer/src/error/codes.g.dart`. In these cases, the
deprecation warning is suppressed with an "ignore" comment.)
This change is part of a long term effort to unify the analyzer and
CFE representations of error messages. It paves the way for a
follow-up CL in which I intend to move some of the generated code from
`package:analyzer` to `package:_fe_analyzer_shared`, to allow it to be
shared with the CFE.
Change-Id: Ie91dc8fc9357defa8974cbe6836d582979d87d81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437840
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent a7e6a9f commit 814c61d
File tree
59 files changed
+181
-71
lines changed- pkg
- analysis_server_plugin/test
- analysis_server
- lib/src
- handler/legacy
- services/correction
- dart
- test
- src/services/correction/fix
- analyzer
- lib/src
- analysis_options/error
- dart
- ast
- error
- resolver
- error
- manifest
- pubspec
- test/src
- dart/resolution
- diagnostics
- tool/messages
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+181
-71
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
pkg/analysis_server/test/src/services/correction/fix/remove_name_from_declaration_clause_test.dart
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments