Skip to main content

Module range

Module range 

Source
Expand description

Maven version range parsing and containment (Maven versioning spec).

§Why this is hand-rolled

No maintained Rust crate implements Maven’s interval-notation range grammar. Unlike NuGet (deps-nuget), Maven ranges may be a top-level comma-separated union of intervals ((,1.0),(1.2,)), so this module owns the union-splitting; each individual interval is parsed and matched by crate::interval, shared with deps-gradle, which has the same bracket-interval grammar but no top-level union.

A bare (non-bracketed) requirement such as "1.0" is Maven’s “soft” recommended version, not a range, and is intentionally not handled here — see is_range.

Functions§

is_range
Whether requirement looks like a Maven range/union, as opposed to a bare “soft” recommended version (which is compared for plain equality by the caller).
satisfies
Checks whether version satisfies a Maven range requirement.