Closed
Description
Describe the bug
It seems that there might be room for improvement for $inspect.trace()
. There are cases where the trace doesn't highlight anything as changed. If nothing really changed, then why did the effect fire, right?
My current possibilities are:
- The trace is correct, and no recorded signals really changed. Implication: There's a bug in Svelte that fires effects unnecessarily.
- The trace is incorrect, as a signal really did change. Implication:
$inspect.trace()
doesn't always show the signals that change, or its highlighting algorithm is sometimes failing to indicate which signals changed.
One possibility that occurs to me: The trace is shown after the effect runs, and it contains all the signals read during that execution. This list is then shown using data from before the effect run to show which signals made the effect fire to begin with by highlighting them in cornflower blue. The potential fail might come here: What if the run doesn't read the signal that made the effect fire? Then there's nothing to highlight.
Reproduction
Instructions
- Open REPL.
- Clear the console.
- Click the "Synchronize Columns" button.
- Examine the third trace: Nothing is highlighted blue.
Logs
No response
System Info
REPL
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels