rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.51k stars 257 forks source link

Allow for recursive queries #1377

Open Xanewok opened 5 years ago

Xanewok commented 5 years ago

Originally created by @Xanewok (https://github.com/rust-dev-tools/rls-analysis/issues/152):

Right now this leads to a silent deadlock because every public query is wrapped in a self.with_analysis(|a| ...) which locks the primary lock for the execution time of the query.

One place where recursive queries are handy is recursive symbol tree processing, e.g. when reconstructing hierarchical symbol outline.

I believe it'd be good to be a bit more explicit about the interior lock and expose it so the user can perform multiple queries in bulk.

jplatte commented 5 years ago

Is this something that requires extensive knowledge about RLS or could a new contributor potentially implement it?