forked from phan/phan
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
See branch daemonize-and-analyze-individual-files. This is incomplete, and makes assumptions about Phan which may be untrue.
EDIT: POC is done
It stops at the parse phase. When it gets a request, it updates the parsed files if they were changed on disk, removes old classes/functions/constants, and adds the new classes/functions/constants from new files.
Note that the daemon will use up a lot of memory in the background (Unlike the earlier sqlite3 work, this doesn't save state to disk). (As much memory as the parse phase uses)
pitfalls
- Undoing duplicate class/method/function declarations may have bugs, especially relating to the alternate fqsens (appending numbers to make them unique)
- symlinks
- Rate limiting, memory usage
- Memoizing stale data
- inheritance
- Files modified while being analyzed (e.g. in IDEs)
Further Enhancements
- use inotify PECL if working, and installed (Faster than checking set of whole files, only see changed files). Add optional dependency.
- Refactor this? (done)
- Add ability to reload parts of the config file, e.g. add new folders to analyze (Reload completely with a different process?)
- (Farther off) API to infer the type of the variable/property/method return value under the cursor of a saved file, somehow. use that for completions.
See the closed issue 22 in upstream
- Hopefully can resurrect vim plugin, with or without vim's new async support.
Metadata
Metadata
Assignees
Labels
No labels