document design guideline

This commit is contained in:
Aleksey Kladov 2019-02-16 14:43:59 +03:00
parent 13f464edbd
commit 2d131d63f9

View File

@ -200,6 +200,12 @@ pub struct Analysis {
db: salsa::Snapshot<db::RootDatabase>,
}
// As a general design guideline, `Analysis` API are intended to be independent
// from the language server protocol. That is, when exposing some functionality
// we should think in terms of "what API makes most sense" and not in terms of
// "what types LSP uses". Although currently LSP is the only consumer of the
// API, the API should in theory be usable as a library, or via a different
// protocol.
impl Analysis {
/// Debug info about the current state of the analysis
pub fn status(&self) -> String {