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
//! Knowledge-map producers (pure-Rust).
//!
//! Three scanners that fill the symbol/call/feature/git-heat tables in
//! the iceberg warehouse so the viz layer can draw a complete map
//! without ever invoking `cargo` or `rustdoc`:
//!
//! - [`symbols::scan_repo`] — walks every `Cargo.toml`, parses every
//! `.rs` file with `syn`, emits one row per discovered item plus
//! one row per call expression and one row per `#[cfg(...)]` attr.
//! - [`git_heat::scan_repo`] — uses `gix` to walk HEAD's commit graph
//! and aggregate per-file commit count / author count / recency.
//!
//! Both producers are idempotent — every scan generates a fresh
//! `snapshot_id` (UUID v4) and appends. The renderer reads the latest
//! snapshot per repo.
/// RESOLVED knowledge map — `rust-analyzer scip` ingest (task #24). Gated on
/// the `scip` feature so default builds never pull `scip`/`protobuf`.
/// RESOLVED knowledge map — rust-analyzer IN-PROCESS (task #24 relaunch). Links
/// `ra_ap_*` as a library; no `rust-analyzer scip` subprocess. Gated on the
/// `ra-ingest` feature so default builds never pull the heavy `ra_ap_*` graph.
use Path;
use Result;
use Uuid;
/// One end-to-end scan: symbols + features + calls + git-heat for
/// `<repo_root>`.