Reads and validates a project's target.exs — the hand-authored record
of what a project asked Capstone for (goals.md D16).
Every read goes through Capstone.Config.Literal, never Code.eval_*:
target.exs is data, not code, per goals.md G6. Validation does not stop
at the first problem — read/1 and read_string/1 return every error
found, so a target.exs with three mistakes reports three.
Summary
Types
Every reason read/1, read_string/1 and their bang variants can fail.
A location inside a parsed target.exs, as a list of map/keyword keys and list indices from the root.
Functions
Reads and validates the target.exs at path.
As read/1, raising Capstone.Config.Error on any validation failure.
Parses and validates source as target.exs content, without touching the filesystem.
As read_string/1, raising Capstone.Config.Error on any validation failure.
Types
@type error() :: {:file_error, File.posix()} | Capstone.Config.Literal.error() | {:not_a_map, term()} | {:missing_key, path()} | {:unknown_key, path(), atom()} | {:invalid_type, path(), String.t(), term()} | {:invalid_value, path(), [term()], term()} | {:unsupported_schema_version, term()}
Every reason read/1, read_string/1 and their bang variants can fail.
@type path() :: Capstone.Config.Literal.path()
A location inside a parsed target.exs, as a list of map/keyword keys and list indices from the root.
@type t() :: %Capstone.Config{ base: :api | :web | :both, container: Capstone.Config.Container.t(), plugins: [atom()], project: Capstone.Config.Project.t(), schema_version: pos_integer(), security: Capstone.Config.Security.t() }
Functions
Reads and validates the target.exs at path.
As read/1, raising Capstone.Config.Error on any validation failure.
Parses and validates source as target.exs content, without touching the filesystem.
As read_string/1, raising Capstone.Config.Error on any validation failure.