Commit 51b7329
Fine. Record const/final/late for fields and top-level variables
Teach the fine-grained manifest to capture field/variable modifiers that
affect API shape and const semantics. Add `isConst`, `isFinal`, and
`isLate` to `InstanceItemFieldItem` and `TopLevelVariableItem`, and
thread them through encoding, decoding, and matching.
- Add the three flags to the two item types and populate them from element properties.
- Persist the flags in summaries (read/write three booleans) and compare
them in `match()` to detect modifier-only changes that impact the API
(e.g. `final` vs `var` alters setter presence; `const` affects
constantness).
- Correct the serialization tag for `InstanceItemFieldItem` to write
`_InstanceItemMemberItemKind.field` (it previously wrote `getter`).
- Bump `AnalysisDriver.DATA_VERSION` to 529 to invalidate stale caches.
This makes manifest matching reflect modifier-driven API differences
more accurately and prevents incorrect bundle reuse when only
`const`/`final`/ `late` change.
Change-Id: I4249456fefdd5763adc5ba294cbf25e32f86511f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447943
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>1 parent e3d218a commit 51b7329
File tree
3 files changed
+334
-2
lines changed- pkg/analyzer
- lib/src
- dart/analysis
- fine
- test/src/dart/analysis
3 files changed
+334
-2
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 | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
495 | 498 | | |
496 | 499 | | |
497 | 500 | | |
498 | 501 | | |
499 | 502 | | |
500 | 503 | | |
501 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
502 | 508 | | |
503 | 509 | | |
504 | 510 | | |
| |||
512 | 518 | | |
513 | 519 | | |
514 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
515 | 524 | | |
516 | 525 | | |
517 | 526 | | |
| |||
522 | 531 | | |
523 | 532 | | |
524 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
525 | 537 | | |
526 | 538 | | |
527 | 539 | | |
| |||
530 | 542 | | |
531 | 543 | | |
532 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
533 | 548 | | |
534 | 549 | | |
535 | 550 | | |
536 | 551 | | |
537 | 552 | | |
538 | 553 | | |
539 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
540 | 558 | | |
541 | 559 | | |
542 | 560 | | |
543 | 561 | | |
544 | 562 | | |
545 | 563 | | |
546 | | - | |
| 564 | + | |
547 | 565 | | |
548 | 566 | | |
549 | 567 | | |
| |||
1323 | 1341 | | |
1324 | 1342 | | |
1325 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1326 | 1347 | | |
1327 | 1348 | | |
1328 | 1349 | | |
1329 | 1350 | | |
1330 | 1351 | | |
1331 | 1352 | | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1332 | 1356 | | |
1333 | 1357 | | |
1334 | 1358 | | |
| |||
1341 | 1365 | | |
1342 | 1366 | | |
1343 | 1367 | | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1344 | 1371 | | |
1345 | 1372 | | |
1346 | 1373 | | |
| |||
1350 | 1377 | | |
1351 | 1378 | | |
1352 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1353 | 1383 | | |
1354 | 1384 | | |
1355 | 1385 | | |
| |||
1358 | 1388 | | |
1359 | 1389 | | |
1360 | 1390 | | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1361 | 1394 | | |
1362 | 1395 | | |
1363 | 1396 | | |
1364 | 1397 | | |
1365 | 1398 | | |
1366 | 1399 | | |
1367 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1368 | 1404 | | |
1369 | 1405 | | |
1370 | 1406 | | |
| |||
0 commit comments