Svelixir.Manifest.Component (svelixir v0.61.1)

Copy Markdown

One component's entry in fireside.exs (SDD 8.2): what it is, which version of it was applied, where that version came from, when it was applied, and every file it owns or contributes to.

origin is {:hex, name, version} or {:path, relative}. An ABSOLUTE path is rejected: a manifest naming one machine's checkout is not portable to another machine or to CI, which is SDD 4.1 defect 13.

deps, aliases and project record what the component changed in the TARGET's mix.exs. They are what lets an update flow attribute a dependency to the component that installed it, and notice that a user has since hand-edited it — without them, apply wrote into mix.exs and nothing said who had. All three default to [] and are OMITTED from the encoded entry when empty, so a manifest written before they existed still decodes and a component that changes nothing gains no keys.

There is no cross-component conflict check here — two components claiming the same file is SDD 7.3 policy, not this file's format, and the MVP produces no component for it to be wrong about.

Summary

Types

origin()

@type origin() :: {:hex, String.t(), String.t()} | {:path, Path.t()}

t()

@type t() :: %Svelixir.Manifest.Component{
  aliases: keyword(),
  applied_at: String.t(),
  deps: [String.t()],
  files: [Svelixir.Manifest.FileEntry.t()],
  name: atom(),
  origin: origin(),
  project: keyword(),
  version: String.t()
}