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
//! The two public Go entry points.
//!
//! Both delegate to the same private projection path over their supplied
//! arguments alone. Neither loads a project, walks a package directory, reads a
//! source, extracts a grammar fact, or runs the resolver.
use ;
use crateGraphBuildError;
use crateCodeGraph;
use crateGraphLimits;
use projection;
/// Project one snapshot-bound Go resolution under the default ceilings.
///
/// ```no_run
/// # use pedant_core::resolution::go::{GoProjectResolution, GoResolutionSnapshot};
/// # use pedant_graph::{CodeGraph, GraphBuildError};
/// # fn topology(
/// # snapshot: &GoResolutionSnapshot,
/// # resolution: &GoProjectResolution,
/// # ) -> Result<CodeGraph, GraphBuildError> {
/// pedant_graph::build_go_graph(snapshot, resolution)
/// # }
/// ```
///
/// The snapshot must be the one the resolution was validated against. A
/// resolution taken before a source-only edit is refused with
/// [`GraphBuildError::SnapshotFingerprintMismatch`] even though both values
/// name the same main module, and no graph record is allocated first.
///
/// # Errors
///
/// Returns [`GraphBuildError`] when the two values describe different
/// repository states, when a stated join names a module, package context,
/// source, or definition the graph holds no record for, when containment is not
/// one module-local forest, or when a collection reaches its ceiling.
/// Project one snapshot-bound Go resolution under caller-chosen ceilings.
///
/// Lowering a [`GraphLimits`] field exercises the same insertion path the
/// default build uses, so a bounded caller and an unbounded one refuse
/// identically.
///
/// # Errors
///
/// The same refusals as [`build_go_graph`], plus
/// [`GraphBuildError::CapacityExceeded`] naming the collection that reached
/// `limits`.