Expand description
WorkspacePackage selection across a PackageGraph.
cabin translates user flags (--workspace, --package,
--exclude, --default-members) into a PackageSelection
and hands it to resolve_package_selection, which validates
the request against the graph and returns the deterministic
ordered list of selected primary-package indices. Centralizing
this here keeps CLI code free of workspace-graph algorithms.
Structs§
- Package
Selection - User-facing selection request, before validation against any concrete graph.
- Resolved
Selection - Final, validated selection. Indices are into
PackageGraph::packagesand are ordered to match the graph’s primary-package ordering.
Enums§
- Selection
Mode - Selection mode the user requested.
Functions§
- closure_
has_ versioned_ deps_ excluding_ with_ dev - Whether the supplied closure carries any versioned
(registry-bound) dependency that the artifact pipeline would
need to fetch. Mirrors
collect_closure_versioned_deps_excluding_with_devbut returns aboolso the CLI can short-circuit before opening an index. - collect_
closure_ versioned_ deps_ excluding_ with_ dev - Enumerate the versioned dependencies that drive
resolve / fetch / update for a selected package set. Walks the
closure (selection + transitive local path deps) so a registry
dep declared by a path-dep
libis visible when the user selectedapp. - combine_
version_ reqs - Combine several version-requirement strings into one
semver::VersionReqby joining them with,(the comma form semver reads as an AND of comparators) and re-parsing. On a parse failure the joined string is returned alongside the error so each caller can build its own diagnostic. This is the single join-on-collision kernel shared by the closure and patch requirement aggregators and the CLI’s root-dep merge. - resolve_
package_ selection - Validate a
PackageSelectionagainstgraphand return the concrete list of selected primary-package indices. Errors are emitted with deterministic, actionable messages so the user can fix typos quickly.