Repository navigation
Commit 2bd751b
committed
fix(compiler): annotate OptionalCallExpression with import provenance for setup detection
Optional hook calls (e.g. readContext?.()) using aliased imports were not
recognized as setup hooks by the auto-memo/Strong system. The hook-deps
annotation pass only stamped _octaneImportedHook on CallExpression nodes,
so autoMemoBuiltinHookName and containsAutoMemoContextRead could not
resolve the canonical hook name for OptionalCallExpression with renamed
bindings.
- Extend hook-deps.js walk to annotate OptionalCallExpression nodes with
_octaneImportedHook, _octaneUnboundCallee, and
_octaneHookRuntimeImportedHook in callAnnotations.
- Extend containsAutoMemoContextRead to check both CallExpression and
OptionalCallExpression for context/use reads.1 parent 0bf9d7f commit 2bd751b
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4178 | 4178 | | |
4179 | 4179 | | |
4180 | 4180 | | |
4181 | | - | |
| 4181 | + | |
| 4182 | + | |
| 4183 | + | |
| 4184 | + | |
4182 | 4185 | | |
4183 | 4186 | | |
4184 | 4187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
608 | 623 | | |
609 | 624 | | |
610 | 625 | | |
| |||
0 commit comments