Repository navigation
Commit 7435403
committed
fix(compiler): detect stale derived-state arguments in Effect Events
Two independent gates silenced OCTANE_STRONG_STALE_STATE_UPDATE for
derived-state values passed to Effect Events:
1. The follow condition only entered an Effect Event body when an argument
was snapshot or state-tuple, so a derived-state argument after an await
was never walked. Added derived-state to the condition.
2. freshRead returned true for every derived-state binding inside an
Effect Event, including parameters that carry a stale caller value.
Removed the blanket early return and instead trace through the
declaration initializer (stored on the binding) so that locals
derived from captured component state remain fresh while parameters
and locals derived from stale parameters are correctly flagged.1 parent 96da3a6 commit 7435403
2 files changed
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2655 | 2655 | | |
2656 | 2656 | | |
2657 | 2657 | | |
2658 | | - | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
2659 | 2666 | | |
2660 | 2667 | | |
2661 | 2668 | | |
| |||
3263 | 3270 | | |
3264 | 3271 | | |
3265 | 3272 | | |
3266 | | - | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
3267 | 3278 | | |
3268 | 3279 | | |
3269 | 3280 | | |
| |||
4624 | 4635 | | |
4625 | 4636 | | |
4626 | 4637 | | |
4627 | | - | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
4628 | 4644 | | |
4629 | 4645 | | |
4630 | 4646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
327 | 329 | | |
328 | 330 | | |
329 | | - | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
| 421 | + | |
421 | 422 | | |
422 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
| |||
0 commit comments