You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3eb12b6
Browse filesBrowse the repository at this point in the historyBrowse files
Compare the exported nodes of an edited non-analysed file before re-analysing its dependents
An edited scanned file re-analysed every file depending on it, and the
files with errors on top, whatever the edit was. An analysed file is
treated with more care: only a change in its exported nodes - a signature,
a PHPDoc, a visibility, a symbol added or removed - reaches the files
depending on it, because nothing else is visible to them; a body-only edit
re-analyses nothing (except the classes using a trait declared in the
file, whose body is analysed in their context).
The non-analysed files the analysed code depends on - scanned files, files
reached only through the autoloader - now get the same treatment. Nothing
analyses them, so their exported nodes are fetched when the cache is saved
(only for the files without an entry: an edited file has its entry
refreshed at restore time, a deleted one loses it), and restore() compares
them with the file's current nodes exactly as it does for an analysed
file: nothing changed - nothing to do; a nested node changed - the
dependents; a root symbol appeared or disappeared - the dependents and the
files with errors, since a file that reported the symbol as unknown
recorded no edge to the file.
The scannedFiles metadata is left with what the dependency graph cannot
see: a scanned file that appeared, or an edited one nothing depends on.
Either re-analyses the files with errors only when it declares any symbol
at all - a config file returning an array cannot define what an error is
about. Without the previous nodes of a file nothing depends on, "declares
a symbol" has to stand in for "declares a new symbol" there.
e2e/result-cache-scanned-exported-nodes: a body-only edit of a scanned
file re-analyses nothing, twice; a changed return type re-analyses the one
file depending on it and leaves the file with an unrelated error alone; a
file without symbols appearing in the scanned directory re-analyses
nothing; a file declaring the missing class re-analyses the files with
errors. The first, third and fourth steps failed before this change.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvMWsNHbCdSgx97Y56XYcU
0 commit comments