pub fn load_project(root: &Path) -> Result<(Project, SourceMap), LoadError>Expand description
Loads root and every Beamfile it (transitively) imports into one
Project, namespacing imported beams by the alias they were
imported under. See the module doc comment for the resolution rules.
This is the single public entry point the CLI calls: load_str (used
internally by this crate’s and the engine’s tests) stays
#[doc(hidden)].
Runs crate::graph::validate_graph once every file has finished
loading, before returning the assembled Project — that check runs
with no [SourceIdScope] active (loading is over by then), so it
stamps each error it produces with the offending beam’s own source
field itself, rather than leaving it at whatever this thread’s ambient
id defaults to.