Package

The basic package representation.

PackageModel.swift:47
final class Package

The package manager conceptually works with five different kinds of packages, of which this is only one:

  1. Informally, the repository containing a package can be thought of in some sense as the “package”. However, this isn’t accurate, because the actual Package is derived from its manifest, a Package only actually exists at a particular repository revision (typically a tag). We also may eventually want to support multiple packages within a single repository.

  2. The PackageDescription.Package as defined inside a manifest is a declarative specification for (part of) the package but not the object that the package manager itself is typically working with internally. Rather, that specification is primarily used to load the package (see the PackageLoading target).

  3. A loaded PackageModel.Manifest is an abstract representation of a package, and is used during package dependency resolution. It contains the loaded PackageDescription and information necessary for dependency resolution, but nothing else.

  4. A loaded PackageModel.Package which has had dependencies loaded and resolved. This is the result after Get.get().

  5. A loaded package, as in #4, for which the targets have also been loaded. There is not currently a data structure for this, but it is the result after PackageLoading.transmute().