pub enum DependencySource {
Path(PathBuf),
Version(VersionReq),
Port(PortDepSource),
Workspace,
}Expand description
Where a dependency is sourced from.
Covers DependencySource::Path for local path dependencies,
DependencySource::Version for registry-resolved versioned
dependencies, DependencySource::Port for foundation-port
dependencies (curated recipes under crates/cabin-port/ports/), and
DependencySource::Workspace for the { workspace = true }
opt-in into the workspace’s shared dependency table. The
Workspace variant is an unresolved marker —
cabin-workspace::load_workspace rewrites it into the
matching Path / Version / Port source from
[workspace.dependencies] before any consumer sees a
crate::Package returned from the workspace loader. If a
Workspace source ever reaches a planner or resolver it
indicates the package was loaded outside of
cabin-workspace, which is a workspace invariant violation
worth surfacing as a clear error in the caller.
Variants§
Path(PathBuf)
Local path dependency. The path is interpreted relative to the manifest directory of the package that declared the dependency.
Version(VersionReq)
Versioned registry dependency. The requirement is matched against candidate versions during dependency resolution.
Port(PortDepSource)
Foundation-port dependency. The recipe source is one of two
shapes (see PortDepSource): a relative path to a port
directory on disk (Path), or a bundled curated recipe keyed
by the dependency name (Builtin). The CLI orchestration
layer prepares the port (download → verify → safe-extract
with strip_prefix → overlay copy) before the workspace
loader resolves the dependency to the prepared directory.
Workspace
dep = { workspace = true }. An unresolved opt-in
into the workspace’s [workspace.dependencies] table.
cabin-workspace::load_workspace resolves these to a
concrete DependencySource::Path or
DependencySource::Version before producing a
PackageGraph.
Trait Implementations§
Source§impl Clone for DependencySource
impl Clone for DependencySource
Source§fn clone(&self) -> DependencySource
fn clone(&self) -> DependencySource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DependencySource
impl Debug for DependencySource
Source§impl<'de> Deserialize<'de> for DependencySource
impl<'de> Deserialize<'de> for DependencySource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DependencySource
impl PartialEq for DependencySource
Source§fn eq(&self, other: &DependencySource) -> bool
fn eq(&self, other: &DependencySource) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DependencySource
impl Serialize for DependencySource
impl Eq for DependencySource
impl StructuralPartialEq for DependencySource
Auto Trait Implementations§
impl Freeze for DependencySource
impl RefUnwindSafe for DependencySource
impl Send for DependencySource
impl Sync for DependencySource
impl Unpin for DependencySource
impl UnsafeUnpin for DependencySource
impl UnwindSafe for DependencySource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.