pub struct BuildPlan { /* private fields */ }
Expand description
Represents the full build plan for a project.
Implementations
sourceimpl BuildPlan
impl BuildPlan
sourcepub fn from_manifest(
manifest: &PackageManifestFile,
offline: bool
) -> Result<Self>
pub fn from_manifest(
manifest: &PackageManifestFile,
offline: bool
) -> Result<Self>
Create a new build plan for the project by fetching and pinning all dependenies.
To account for an existing lock file, use from_lock_and_manifest
instead.
sourcepub fn from_lock_and_manifest(
manifest: &PackageManifestFile,
locked: bool,
offline: bool
) -> Result<Self>
pub fn from_lock_and_manifest(
manifest: &PackageManifestFile,
locked: bool,
offline: bool
) -> Result<Self>
Create a new build plan taking into account the state of both the PackageManifest and the existing lock file if there is one.
This will first attempt to load a build plan from the lock file and validate the resulting graph using the current state of the PackageManifest.
This includes checking if the [dependencies] or [patch] tables have changed and checking the validity of the local path dependencies. If any changes are detected, the graph is updated and any new packages that require fetching are fetched.
The resulting build plan should always be in a valid state that is ready for building or checking.
sourcepub fn manifest_map(&self) -> &ManifestMap
pub fn manifest_map(&self) -> &ManifestMap
View the build plan’s map of pinned package IDs to their associated manifest.
sourcepub fn compilation_order(&self) -> &[NodeIx]
pub fn compilation_order(&self) -> &[NodeIx]
The order in which nodes are compiled, determined via a toposort of the package graph.