1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[]
= "cpp_code_analysis"
= "0.4.0"
= "2024"
= "The analysis layer of cpp_ls: the preprocessor, symbol scopes, type inference and the semantic checks."
= "MIT"
= ["CppCXY"]
= "https://github.com/CppCXY/cpp_ls"
= "README.md"
= ["cpp", "language-server"]
= ["development-tools"]
[]
= true
# **The layer below this one**: the toolchain, the include resolver, the walk and the preprocessor. It is a crate
# rather than a folder because the direction has to be the compiler's to enforce — the preprocessor may not ask the
# index what a name means, and while both lived in one crate nothing stopped it.
= true
# **An expansion is code, and the hover shows it as code.** `the_expansion_of_a_macro` hands the preprocessor's own
# answer to the formatter before a reader sees it: `((a)+(b))` with the arguments substituted is not what a reader
# wants to compare with the source, and re-spacing it by hand here would be a second formatter. The formatter depends
# on `cpp_parser` only, so this edge closes no cycle.
= true
# **The decisions this layer makes are invisible from outside it**, and a report that says "completion and the hints
# come and go" cannot be answered from the LSP layer alone: whether a callee resolved, whether its parameter list was
# readable, and which of the four ways a call produces no hint are all decided here, in `inlay` and `index::project`.
# The alternative is a signature that returns its own diagnosis, which is a worse shape for every other caller.
#
# Already in the graph — `cpp_ls` logs through it — so this is a dependency edge rather than a new crate.
= true
# `WatchFilter` ignores paths by *pattern* as well as by directory (`**/build/**`, `*.generated.h`): which trees a
# project considers its own source is a convention no analysis can guess, so a caller says it — and a caller with a
# configuration file has a glob in its hand, not a directory.
= true
# The diagnostics speak the reader's language (see the crate documentation), the cache is one embedded database with
# compressed entries, and `rustc-hash` is the hasher the index's tables are built over — three things that are about
# what a *summary* is, and therefore still this layer's. `serde`/`toml`/`smol_str` moved to `cpp_toolchain` with the
# files that read them (a `.cppls.toml` is the project's, not the index's).
= true
= true
= true
= "2"
# **A summary's text is an identifier, not a document.** `SmolStr` keeps up to 22 bytes inline, so a declaration's name
# costs no allocation at all — and a `FileSummary` is made of them: 486 783 declarations over 1 761 files on
# `EmmyLuaCodeStyle`, 517 bytes each. See `tests/summary_cost_probe.rs`. The `serde` feature is on because a name
# ends up in an LSP payload (`typeHierarchyItem.data`), and converting at each site is what the type should not need.
= { = "0.2", = ["serde"] }
[]
# **The performance probe's observation points.** Off by default and **not compiled** when off: the marks in the
# read are `#[cfg(feature = "perf-probe")]`, so the default build has no counter, no atomic and no branch on the path a
# reader's keystroke takes. On, it lets `tests/allocation_probe.rs` split one read's allocations by phase.
= []
[]
# **The memory probe measures the allocator the server actually uses.** `cpp_ls` installs mimalloc as its global
# allocator, and the question `docs/memory-audit.md` asks — "is the resident set the live tables or pages the
# allocator is holding" — cannot be answered with a different allocator underneath. The wrapper is
# `mimalloc-safe`, the one `cpp_ls` depends on, so the probe and the server cannot drift apart.
= "0.1.70"