pub struct ExternalPackages { /* private fields */ }Expand description
Packages to reference rather than generate, keyed by package id or package name.
The name form is the one to prefer: a package id is the hash of one build, so pinning by id stops matching the moment the dependency is rebuilt, while the name survives a version bump — which is the whole point of addressing packages by name under Smart Contract Upgrade.
Implementations§
Source§impl ExternalPackages
impl ExternalPackages
Sourcepub fn with(self, key: impl Into<String>, crate_name: impl Into<String>) -> Self
pub fn with(self, key: impl Into<String>, crate_name: impl Into<String>) -> Self
Reference the package identified by key (its name, or its id hash) at
the crate crate_name, instead of generating it.
Sourcepub fn with_prefixed(
self,
prefix: impl Into<String>,
crate_name: impl Into<String>,
) -> Self
pub fn with_prefixed( self, prefix: impl Into<String>, crate_name: impl Into<String>, ) -> Self
Reference every package whose name is prefix, or begins with
prefix-, at crate_name.
For a family that arrives as many packages — the standard library is some thirty, and which of them a DAR carries depends on what its Daml source touched. An exact list is right for one DAR and wrong for the next; the family is what is meant.
Sourcepub fn crate_names(&self) -> Vec<String>
pub fn crate_names(&self) -> Vec<String>
The crate names named here, sorted — what a generated manifest must depend on.