mod ecosystem¶
- module ecosystem¶
Dependency-spec helpers shared by the language-ecosystem parsers.
PyPI, CRAN and every ecosystem after them write a dependency the same way: a name, then an optional comparator and version. The grammars differ in what surrounds that pair (PEP 508 markers and extras, R’s parenthesised pins), and that part belongs in the ecosystem module. The split itself does not, and keeping one copy is what stops the two implementations drifting: the PyPI copy grew parenthesis handling it never needed while the CRAN copy, whose grammar is the one that uses parentheses, lost it.
Functions
- fn parse_package_index(text: &str) -> std::collections::BTreeMap<String, IndexEntry>¶
Parse a repository index into package name to version.
The format is the one CRAN publishes as
PACKAGESand Debian calls a control file: stanzas ofField: valueseparated by blank lines. It is the artifact a site already has offline, which is what an overlay needs when a dependency states no version of its own.
Structs and Unions