Repository navigation
Commit 458c576
authored
[flutter_tools] Implement Diagnostics extension slice and doctor integration (flutter#191162)
## Description
This PR implements Step 3 of Flutter Tools Extensibility: the
Diagnostics extension slice and doctor integration.
### Architectural Overview
1. **`package:flutter_tools_core`**:
- Defines core, platform-agnostic diagnostic models: `ValidationType`,
`ValidationMessage`, and `ValidationResult`.
2. **`package:flutter_tools_extension`**:
- Defines the `DiagnosticsExtension` interface and service contract
(`getTitle()`, `runDiagnostics()`).
3. **`package:flutter_tools_extension_linux_prototype`**:
- Implements `LinuxExtensionDiagnostics` validator in the Linux
prototype extension.
4. **`packages/flutter_tools`**:
- Implements `DiagnosticsExtensionClient` to query isolate extensions
over RPC.
- Introduces `ExtensionDoctorValidator` which adapts extension
diagnostic results into Flutter tool `DoctorValidator` instances.
- Wires `ExtensionDoctorValidator` into `Doctor.validators` via
`ExtensionManager`.
- Deprecates duplicate diagnostic types in `doctor_validator.dart` in
favor of `package:flutter_tools_core` exports.
## Related Issues
Part of flutter#190692
## Tests
- Added
`packages/flutter_tools/packages/flutter_tools_core/test/diagnostics_test.dart`
- Added
`packages/flutter_tools/packages/flutter_tools_extension_linux_prototype/test/linux_diagnostics_test.dart`
- Added
`packages/flutter_tools/test/general.shard/extension_protocol/diagnostics_service_test.dart`
- Added
`packages/flutter_tools/test/commands.shard/hermetic/tool_extensions_integration_test.dart`
- Added
`packages/flutter_tools/test/integration.shard/tool_extensions_test.dart`
- Updated existing doctor and validator tests in `commands.shard` and
`general.shard`.1 parent 47ec0eb commit 458c576
42 files changed
Lines changed: 931 additions & 173 deletions
File tree
- packages/flutter_tools
- lib
- src
- android
- commands
- experimental
- intellij
- linux
- macos
- web
- windows
- packages
- flutter_tools_core
- lib
- src
- test
- flutter_tools_extension_linux_prototype
- lib
- src
- test
- flutter_tools_extension/lib
- src
- test
- commands.shard/hermetic
- general.shard
- android
- extension_protocol
- intellij
- linux
- macos
- web
- windows
- integration.shard
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
187 | 199 | | |
188 | 200 | | |
189 | 201 | | |
| 202 | + | |
190 | 203 | | |
191 | 204 | | |
192 | 205 | | |
| |||
256 | 269 | | |
257 | 270 | | |
258 | 271 | | |
259 | | - | |
| 272 | + | |
260 | 273 | | |
261 | 274 | | |
262 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
54 | 75 | | |
55 | 76 | | |
56 | 77 | | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
70 | 92 | | |
71 | 93 | | |
72 | 94 | | |
73 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
74 | 100 | | |
75 | 101 | | |
76 | 102 | | |
77 | 103 | | |
78 | 104 | | |
| 105 | + | |
79 | 106 | | |
80 | 107 | | |
81 | 108 | | |
| |||
141 | 168 | | |
142 | 169 | | |
143 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
144 | 174 | | |
145 | 175 | | |
146 | 176 | | |
| |||
183 | 213 | | |
184 | 214 | | |
185 | 215 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
217 | 259 | | |
218 | | - | |
219 | | - | |
| 260 | + | |
| 261 | + | |
220 | 262 | | |
221 | 263 | | |
222 | 264 | | |
| |||
313 | 355 | | |
314 | 356 | | |
315 | 357 | | |
| 358 | + | |
316 | 359 | | |
317 | 360 | | |
318 | 361 | | |
| |||
329 | 372 | | |
330 | 373 | | |
331 | 374 | | |
332 | | - | |
| 375 | + | |
| 376 | + | |
333 | 377 | | |
334 | 378 | | |
335 | 379 | | |
| |||
831 | 875 | | |
832 | 876 | | |
833 | 877 | | |
834 | | - | |
| 878 | + | |
835 | 879 | | |
836 | 880 | | |
837 | 881 | | |
838 | 882 | | |
839 | | - | |
| 883 | + | |
840 | 884 | | |
841 | 885 | | |
842 | 886 | | |
| |||
0 commit comments