analyze method
Analyzes the given path and returns the resolved unit results.
If the path is a file, it will be analyzed as a single file. If the path is a directory, it will be analyzed as a directory.
Retries on InconsistentAnalysisException since the session can be
invalidated when file watchers trigger refresh while analysis is in
progress or when Units.resolved is awaited after the lock is released.
Implementation
Future<List<Units>> analyze(String path) async {
return _withSessionLock(() => _analyzeWithRetry(path));
}