sigildocs

(sigil build deps)

(sigil build deps) - Dependency Resolution

This library provides dependency graph construction and resolution for building packages in the correct order.

Example usage: (define packages (workspace-load-packages ws ws-dir)) (define graph (build-dependency-graph packages)) (define order (topological-sort graph)) ;; order is a list of package names in build order

Exports

Extract direct dependency names from a package Returns a list of package name strings

Extract all dependency names from a package (including dev-dependencies) Returns a list of package name strings

Get the name from a dependency (handles different dep types)

Extract package name from git URL

Build a dependency graph from a list of packages Input: alist of (package-name . package) pairs Optional: include-dev-deps? - if #t, includes dev-dependencies Returns: alist of (package-name . (list of dep-names)) Only includes deps that are in packages-alist (filters out external deps that aren't part of this build, like internal workspace deps of redirected packages)

Dedupe external (from-git / from-path) packages against workspace members.

When a workspace member shares a name with an external dep loaded transitively (typical shape: extracted package's from-git ref to a sibling that is still resident in the consumer's workspace), the merged packages-alist ends up with two entries under the same name. That breaks topological-sort (length comparison fires a spurious "Dependency cycle detected") and causes find-package-path to resolve to the cached external copy instead of the workspace source.

Policy: workspace member always wins. If the fetched copy declares a different version, emit a warning and proceed with the workspace version.

Inputs: workspace-packages: alist of (name . package) for workspace members external-packages: alist of (name . package) for from-git/from-path deps external-paths: alist of (name . path) for the same external deps

Returns: (deduped-external-packages . deduped-external-paths)

Emit a warning when a workspace package and a fetched external copy declare different versions. Silent when either side has no version field or the versions match.

Get build order for all packages in a workspace Optional: include-dev-deps? - if #t, includes dev-dependencies Returns list of package names in build order (dependencies first)

Get build order for a specific package and its dependencies Optional: include-dev-deps? - if #t, includes dev-dependencies Returns list of package names needed to build target (in order)

(No description)

(No description)

(No description)

has-cycle?variable

(No description)