From ed20a857f485a471369cd99b843af19a4d875ad0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:25:38 +0200 Subject: Rename ra_db -> base_db --- docs/dev/architecture.md | 6 +++--- docs/dev/guide.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/dev') diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 21373729c..746d41f83 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md @@ -92,14 +92,14 @@ in particular: it shows off various methods of working with syntax tree. See [#93](https://github.com/rust-analyzer/rust-analyzer/pull/93) for an example PR which fixes a bug in the grammar. -### `crates/ra_db` +### `crates/base_db` We use the [salsa](https://github.com/salsa-rs/salsa) crate for incremental and on-demand computation. Roughly, you can think of salsa as a key-value store, but -it also can compute derived values using specified functions. The `ra_db` crate +it also can compute derived values using specified functions. The `base_db` crate provides basic infrastructure for interacting with salsa. Crucially, it defines most of the "input" queries: facts supplied by the client of the -analyzer. Reading the docs of the `ra_db::input` module should be useful: +analyzer. Reading the docs of the `base_db::input` module should be useful: everything else is strictly derived from those inputs. ### `crates/ra_hir*` crates diff --git a/docs/dev/guide.md b/docs/dev/guide.md index c3252f1f6..d14143226 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -259,7 +259,7 @@ Salsa input queries are defined in [`FilesDatabase`] (which is a part of `RootDatabase`). They closely mirror the familiar `AnalysisChange` structure: indeed, what `apply_change` does is it sets the values of input queries. -[`FilesDatabase`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_db/src/input.rs#L150-L174 +[`FilesDatabase`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/base_db/src/input.rs#L150-L174 ## From text to semantic model @@ -392,7 +392,7 @@ integers which can "intern" a location and return an integer ID back. The salsa database we use includes a couple of [interners]. How to "garbage collect" unused locations is an open question. -[`LocationInterner`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_db/src/loc2id.rs#L65-L71 +[`LocationInterner`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/base_db/src/loc2id.rs#L65-L71 [interners]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_hir/src/db.rs#L22-L23 For example, we use `LocationInterner` to assign IDs to definitions of functions, -- cgit v1.2.3