Commit 740e819
Fine. Record class modifiers in manifests.
Capture Dart class modifiers as part of the fine-grained manifest so ID
matching and reuse reflect API-relevant changes. Modifiers like
`abstract`, `base`, `final`, `interface`, `mixin class`, `mixin
application`, and `sealed` affect subtyping and visibility rules; they
must therefore participate in identity, matching, and dumps.
Changes:
- Extend `ClassItem` with boolean flags:
`isAbstract`, `isBase`, `isFinal`, `isInterface`,
`isMixinApplication`, `isMixinClass`, `isSealed`.
- Include these flags in encode/decode/write and in `match(...)`.
- Print a `flags:` block for classes in `LibraryManifestPrinter` when
`withElementManifests` is enabled.
- Bump `AnalysisDriver.DATA_VERSION` to 530 to invalidate caches and
avoid reusing bundles with the old manifest layout.
- Add tests exercising ID churn when modifiers change and updating
expect output where flags are now printed.
Impact:
- Prevents stale ID reuse when class modifiers change.
- Ensures downstream libraries re-link when modifier changes affect
inheritance and implementability.
- Improves diagnostic correctness and manifest transparency.
Change-Id: I8914e4a9be18ea4fc0c6978029061e16aeb33e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447962
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>1 parent baa7da3 commit 740e819
File tree
4 files changed
+385
-1
lines changed- pkg/analyzer
- lib/src
- dart/analysis
- fine
- test/src/dart/analysis
4 files changed
+385
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
34 | 49 | | |
35 | 50 | | |
36 | 51 | | |
| |||
54 | 69 | | |
55 | 70 | | |
56 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
74 | 96 | | |
75 | 97 | | |
76 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
77 | 106 | | |
78 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
79 | 132 | | |
80 | 133 | | |
81 | 134 | | |
| |||
0 commit comments