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
//! Ruby's usage-graph scans: the per-symbol forward scan
//! ([`extractor`]/[`hits`]) and the whole-workspace inverted per-file walk
//! ([`inverted`]), both resolving references through [`resolver`] -- the shared
//! Ruby resolution library the definition route also reads.
//!
//! No analyzer handle appears here. `brokk-bifrost-analysis` downcasts once and
//! hands over a [`RubyGraphSource`] plus the
//! [`RubySource`](crate::graph_support::RubySource) the memoized Ruby products
//! come from.
use ;
/// The *dispatching* analyzer's side of a Ruby usage-graph scan.
///
/// Deliberately not the Ruby analyzer, for the reason recorded on
/// `PythonGraphSource`: in a mixed workspace the query is issued against a
/// `MultiAnalyzer`, whose `definitions` merges every language's shards and whose
/// enclosing-unit lookup crosses language boundaries. The walks depend on that
/// reach, so this stays separate from the
/// [`RubySource`](crate::graph_support::RubySource) that answers the Ruby-only
/// questions.
///
/// `definitions` is a callback rather than a handle because the analyzer's
/// global definition index is built lazily on first access and only the
/// factory-return inference in [`extractor`] reaches it; the diagnostics pass
/// builds a [`resolver::RubySemanticIndex`] and never touches it at all, so
/// returning a handle would force the build there too.