Commit 539840f
dartdev: Simplify some JSON-parsing code; remove dead code
* In `_handleServerResponse`, use if-case with map patterns to avoid
casts and null checks and repeatedly fetching map values.
* Remove the castStringKeyedMap utility. After some other changes,
most call-sites passed in a Map, so then half of the utility is not
used. In the others, it seemed simplest to use `as Map` and `.cast()`
inline.
* Change some `dynamic` local variables to be `Object?` instead.
* Replace `DartdevCommand.project` getter and `_project` field with a
single final field.
* Remove unused properties from `Project` and unused `PackageConfig`
class.
* Remove associated tests.
Change-Id: I1f626ecc0e6e4d27ef24f65959fd4cb54fb5fc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412980
Reviewed-by: Devon Carew <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>1 parent c2a60ab commit 539840f
File tree
5 files changed
+22
-172
lines changed- pkg/dartdev
- lib/src
- test
5 files changed
+22
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 287 | + | |
| 288 | + | |
291 | 289 | | |
292 | | - | |
| 290 | + | |
293 | 291 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
302 | 296 | | |
303 | 297 | | |
304 | 298 | | |
| |||
315 | 309 | | |
316 | 310 | | |
317 | 311 | | |
318 | | - | |
319 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
320 | 315 | | |
321 | 316 | | |
322 | 317 | | |
323 | | - | |
| 318 | + | |
324 | 319 | | |
325 | 320 | | |
326 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
74 | | - | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
| |||
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
150 | | - | |
151 | | - | |
152 | 147 | | |
153 | 148 | | |
154 | 149 | | |
| |||
157 | 152 | | |
158 | 153 | | |
159 | 154 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 155 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 112 | | |
120 | 113 | | |
121 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 111 | | |
127 | 112 | | |
128 | 113 | | |
| |||
138 | 123 | | |
139 | 124 | | |
140 | 125 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 126 | | |
180 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 56 | | |
81 | 57 | | |
82 | 58 | | |
| |||
185 | 161 | | |
186 | 162 | | |
187 | 163 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
0 commit comments