Commit a7a6d89
authored
fix: correctly handle functions when determining async blockers (#17137)
* fix: correctly handle functions when determining async blockers
We didn't properly handle functions (function declarations/expressions/arrow functions) when calculating what is a blocker. More specifically
- we did defer assignment of variable declarations even for arrow functions and function expressions, which is unnecessary and causes bugs when they're then referenced eagerly further below
- we did not compute blockers for functions. They could reference blockers themselves, as such other code referencing them should wait on the related blockers
Fixes #17129
* put into its own function
* fix: take blockers into account when creating `#await` blocks
The unrelated-but-in-the-same-issue-referenced-bug
* oops
* fix
* minimize compiled output changes
* no idea why editor showed these as unused1 parent e0501ed commit a7a6d89
File tree
15 files changed
+434
-207
lines changed- .changeset
- packages/svelte
- src/compiler
- phases
- 2-analyze
- 3-transform/client/visitors
- utils
- tests/runtime-runes/samples
- async-await-block
- async-indirect-blockers
15 files changed
+434
-207
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments