Skip to main content

Module dependency

Module dependency 

Source
Expand description

One [dependencies] or [local-dependencies] entry, as a package manifest or a consumer mars.toml writes it: its source, selectors and filter, and the rules that hold wherever it is read. The consumer’s configuration, a package’s manifest reading and mars add all read an entry through Entry::read, which holds every rule and says, by Strictness, which of them refuse and which only warn.

Structs§

Dependencies
A package manifest’s two dependency tables, entries by name in declaration order.
Entry
One dependency entry. It serializes in the spelling of the file (url or path, version, subpath, dialect, plugin, the filter keys), so a consumer’s mars.toml writes it back as it was authored. version is a git source’s constraint; a path source has none and ignores it.
EntryWarning
A rule a Strictness::Package entry broke and was kept anyway.
RawEntry
The authored shape of an entry, before the rules that need its name. A consumer’s mars.toml holds entries in this shape, so a file with a bad entry still loads and mars remove can repair it; Entry::read applies the rules where an entry is used.

Enums§

EntryError
An entry the schema refuses, by the rule it breaks. Each message names the entry.
PluginSelectorError
A dependency entry that selects a marketplace plugin with a key that contradicts it.
Source
Where an entry’s package comes from: a git repository or a directory, never both.
Strictness
Who an entry is read for, which decides what a rule does when it breaks.

Functions§

validate_plugin_selector
plugin picks one plugin of the marketplace at the source’s root, read as a Claude marketplace; a subpath or dialect would name a different root or reading.