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
We tend to have a lot of IDE features randomly panic simply because a node that is being used in a lookup is not cached in the parse tree cache. This is really annoying and keeps getting worse and better every few weeks. We ought to remodel the APIs involved to either make this practically impossible (any node that may be produced immediately being cached) or have the cache be redundant for lookups (passing the corresponding file ids, making the find_file internal function obsolete).
The former would be nicer in terms of usability, but the latter will ensure the problem from not occuring anymore (unless the file id is mismatched but that's is a lot more difficult to run into than it is to not cache a node).
The text was updated successfully, but these errors were encountered:
Another thing I just realized (as r-a immediately panicked on start up for me in inlay hints), the LRU cache can cause issues here. The root_to_file_cache maps root nodes to the file ids, equality for nodes is identity based. Now if we cache one copy from the LRU in there, then the LRU evicts this one result in the Database and we requery it somehow we will now fail the lookup because the identitiy of the root node differs.
fix: Remove extra parse cache from Semantics again
Should fix#17376, specifically 30c04d5
The recent changes here were heavily triggering what I realized in #17367 (comment)
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Jun 23, 2024
We tend to have a lot of IDE features randomly panic simply because a node that is being used in a lookup is not cached in the parse tree cache. This is really annoying and keeps getting worse and better every few weeks. We ought to remodel the APIs involved to either make this practically impossible (any node that may be produced immediately being cached) or have the cache be redundant for lookups (passing the corresponding file ids, making the
find_file
internal function obsolete).The former would be nicer in terms of usability, but the latter will ensure the problem from not occuring anymore (unless the file id is mismatched but that's is a lot more difficult to run into than it is to not cache a node).
The text was updated successfully, but these errors were encountered: