Weld.Plan (weld v0.20.2)

Copy Markdown View Source

Resolves one artifact view from the manifest and workspace graph.

Summary

Types

A source-to-target inventory relationship within an artifact plan.

t()

Types

external_dep()

@type external_dep() :: Weld.Graph.external_dep()

inventory_entry()

@type inventory_entry() :: %{
  optional(:operation) => :link_or_copy | :copy | :transform | :generate,
  optional(:publish) => boolean(),
  source: String.t(),
  target: String.t(),
  owner: String.t() | nil,
  kind: :compiled | :runtime | :test | :docs | :metadata | :artifact_test,
  directory: boolean()
}

A source-to-target inventory relationship within an artifact plan.

Monolith entries also describe the materialization operation and whether the destination belongs to the publication inventory.

t()

@type t() :: %Weld.Plan{
  artifact: Weld.Manifest.Artifact.t(),
  artifact_graph: Weld.Graph.t() | nil,
  dependency_ids: [String.t()],
  excluded_ids: [String.t()],
  external_deps: [external_dep()],
  externalized_edges: [Weld.Graph.Edge.t()],
  facts: term(),
  graph: Weld.Graph.t(),
  input_watches: [map()],
  inventory_member_ids: [String.t()],
  layout: map() | nil,
  manifest: Weld.Manifest.t(),
  output_inventory: [map()],
  selected_ids: [String.t()],
  selected_projects: [Weld.Workspace.Project.t()],
  source_inventory: [inventory_entry()],
  source_member_ids: [String.t()],
  source_root: Path.t() | nil,
  source_roots: [inventory_entry()],
  structural_inputs: [Path.t()],
  verification_ids: [String.t()],
  violations: [Weld.Violation.t()],
  workspace: Weld.Workspace.t()
}

Functions

build!(source, opts \\ [])

@spec build!(
  Path.t() | Weld.Manifest.t(),
  keyword()
) :: t()

build_from_workspace!(manifest, workspace, opts)

ensure_valid!(plan)

See Weld.Core.Selection.ensure_valid!/1.

external_deps_for_view(plan, view)

See Weld.Core.Selection.external_deps_for_view/2.

projects_for_view(plan, view)

See Weld.Core.Selection.projects_for_view/2.

selected?(plan, id)

See Weld.Core.Selection.selected?/2.