ada9cf43db
What happens in this case is that when we analyze this project with many (very small) files, we successfully index first declarations (on computing RESOLVED_UNIT3) and then RESOLVED_UNIT. But when we attempt to search, we ask for RESOLVED_UNIT, which is flushed. So, we compute it. In the process we compute RESOLVED_UNIT3, and the listener in _setupIndexInvalidation() indexes declarations, and overwrites the full index. There are several possible solutions, the simplest one is to not overwrite any existing index information while indexing declarations. R=brianwilkerson@google.com BUG= https://github.com/dart-lang/sdk/issues/26355 Review URL: https://codereview.chromium.org/1946353004 .