Repository navigation
Commit 25acfb0
committed
fix(compiler): detect stale state updates through Effect Event arguments
When an Effect Event receives state as arguments from deferred code, setter
calls inside its body that use those argument-bound snapshots should trigger
OCTANE_STRONG_STALE_STATE_UPDATE. The 'event' phase override correctly
suppresses the diagnostic for captures (which read the latest committed
value), but it was also suppressing it for argument-bound state that was
evaluated at the deferred call site.
Add a boundary-aware stale check that fires during the Effect Event body
visit. The boundary is set to the callback's parent scope (component scope),
so identifiers resolving from that scope or above (captures) are excluded
while identifiers resolving from the function scope (parameters bound to
args) are checked.1 parent 533950f commit 25acfb0
3 files changed
Lines changed: 51 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
| 1539 | + | |
1539 | 1540 | | |
1540 | 1541 | | |
1541 | 1542 | | |
| |||
4473 | 4474 | | |
4474 | 4475 | | |
4475 | 4476 | | |
| 4477 | + | |
| 4478 | + | |
4476 | 4479 | | |
4477 | 4480 | | |
4478 | 4481 | | |
| |||
4625 | 4628 | | |
4626 | 4629 | | |
4627 | 4630 | | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
4628 | 4635 | | |
| 4636 | + | |
4629 | 4637 | | |
4630 | 4638 | | |
4631 | 4639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| |||
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
311 | 324 | | |
| 325 | + | |
| 326 | + | |
312 | 327 | | |
313 | 328 | | |
314 | 329 | | |
| |||
392 | 407 | | |
393 | 408 | | |
394 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
395 | 413 | | |
396 | 414 | | |
397 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
398 | 425 | | |
399 | 426 | | |
400 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
633 | 637 | | |
634 | 638 | | |
635 | 639 | | |
| |||
0 commit comments