Function forc_pkg::dependency_namespace
source · pub fn dependency_namespace(
lib_namespace_map: &HashMap<NodeIx, Module>,
compiled_contract_deps: &HashMap<NodeIx, BuiltPackage>,
graph: &Graph,
node: NodeIx,
constants: BTreeMap<String, ConfigTimeConstant>,
engines: Engines<'_>
) -> Result<Module, Vec1<CompileError>>
Expand description
Builds the dependency namespace for the package at the given node index within the graph.
This function is designed to be called for each node in order of compilation.
This function ensures that if core
exists in the graph (the vastly common case) it is also
present within the namespace. This is a necessity for operators to work for example.
This function also ensures that if std
exists in the graph,
then the std prelude will also be added.