Skip to content

Commit 70e3473

Browse files
bors[bot]matklad
andauthored
9081: minor: expand docs a tiny bit r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents c460bae + 5e577a6 commit 70e3473

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/dev/architecture.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ Reading the docs of the `base_db::input` module should be useful: everything els
146146

147147
**Architecture Invariant:** particularities of the build system are *not* the part of the ground state.
148148
In particular, `base_db` knows nothing about cargo.
149+
For example, `cfg` flags are a part of `base_db`, but `feature`s are not.
150+
A `foo` feature is a Cargo-level concept, which is lowered by Cargo to `--cfg feature=foo` argument on the command line.
149151
The `CrateGraph` structure is used to represent the dependencies between the crates abstractly.
150152

151153
**Architecture Invariant:** `base_db` doesn't know about file system and file paths.
@@ -452,3 +454,4 @@ It is not cheap enough to enable in prod, and this is a bug which should be fixe
452454

453455
rust-analyzer strives to be as configurable as possible while offering reasonable defaults where no configuration exists yet.
454456
There will always be features that some people find more annoying than helpful, so giving the users the ability to tweak or disable these is a big part of offering a good user experience.
457+
Mind the code--architecture gap: at the moment, we are using fewer feature flags than we really should.

0 commit comments

Comments
 (0)