sigildocs

(sigil deps installed)

(sigil deps installed) - Fast installed-deps check + path helpers

The minimal "are this project's external deps installed on disk?" check used by cli/boot.sgl and cli/build-cmds.sgl's workspace-build path. Stays in BOOTSTRAP_MODULES; deliberately does NOT depend on (sigil git), (sigil deps fetch), (sigil deps lock), or (sigil deps semver) so those modules can drop from bootstrap and become extractable.

The check is filesystem-only: for each from-git / from-path dep, derive the symlink path (.sigil/deps/<name>) or resolve the from-path target and verify it exists. No git operations, no lockfile parsing, no semver resolution.

Also exports the path/collection helpers (local-deps-dir, collect-git-deps, collect-path-deps, resolve-path-dependency, get-dep-package-path) that fetch.sgl previously owned. fetch.sgl now re-exports these from here so post-bootstrap callers keep working.

Exports

The local deps directory for a project (.sigil/deps). Symlinks are placed here pointing at shared worktrees in $SIGIL_HOME/deps; from-path deps are resolved directly.

Path to where a dependency's symlink lives in the project.

Collect every from-git dependency from a package or workspace. Includes dev-dependencies and the auto-derived sigil-stdlib (and sigil-lib for c-source packages) peer deps. For workspaces, walks every member package and aggregates. Dependencies whose package names are already owned by the current workspace are omitted: the workspace copy wins over auto-derived peer deps and stale lock pins.

Collect every from-path dependency that has a package: field (workspace references). Bare from-path deps without package: are resolved at build time and don't need installation, so they're excluded here.

Collect every from-pkg (registry) dependency from a package or workspace. Mirrors collect-git-deps: walks effective deps, and for workspaces aggregates across members while omitting deps whose names are already owned by the workspace (the workspace copy wins).

Resolve a from-path dependency to (pkg-name . pkg-path) or #f if the path doesn't exist or doesn't contain a package.sgl. Used both to load from-path deps for the build graph and to verify that redirected deps resolve.

git-dep-nameprocedure

Derive the on-disk package name for a from-git dep. Priority: explicit name: > package: field > subpath basename > forge URL repo segment. Returns #f if none of those produce a name (most commonly when a full-URL dep declares neither name nor package nor subpath — that dep is treated as unresolvable by callers).

Used in two places:

  1. The bootstrap missing-deps check below — derive the symlink path under .sigil/deps/<name> and check existence.
  2. build-cmds.sgl's load-single-git-dep — same purpose, different stage. Prior to this refactor that code reached directly into (sigil git)'s parse-git-url + git-url-repo, pulling sigil-git into the bootstrap surface.
pkg-dep-nameprocedure

The on-disk package name for a from-pkg (registry) dep. The registry name IS the on-disk name (.sigil/deps/<name>), so this is just the declared name:.

Return the list of dependencies that are not currently installed on disk. Each missing dep is represented by a string identifier (the package name when known, otherwise the URL or path).

Optional third argument is a redirects record (from (sigil deps redirects)). When passed, redirects are applied before checking, so redirected deps are checked at their target location.

Predicate form. Returns #t when every declared dependency is installed on disk (after applying optional redirects), #f otherwise.

Print the operator-facing diagnostic for a package missing its sigil: field. Extracted from validate-host-sigil-field so exception-free callers (see the export comment) can report the failure without going through the raise.

Exception-free scan for a host package (or workspace member) missing its sigil: field. Returns #f when every host package declares one, or (pkg-file . pkg) for the first offender. Mirrors the iteration in validate-host-sigil-fields-on exactly; keep the two in sync.

Raise a clean, copy-paste-ready error if pkg is missing the top-level sigil: field. Returns the field's range string when present. pkg-file is the absolute or repo-relative path used in the diagnostic to point at the offending file.

Fires at command entry (e.g., sigil deps install, sigil build), not at parse time, so the bootstrap parse can still succeed before validation runs.

NOTE: the raise below does NOT survive a native-codegen binary (it is answered by a dead handler and converted into a value). Exit-code- bearing paths must use find-missing-sigil-field + report-missing-sigil-field + plain exit instead — see build-cmds.sgl.

Validate every host package's sigil: field for a workspace or standalone package. Loads each member package.sgl (workspace case) or validates the single host (standalone case). Errors with the same clean message produced by validate-host-sigil-field.

TODO (Step 2 of the 0.14.0 redesign, t-dc5d): once the extracted libraries declare sigil: themselves, extend this to fire on transitive dependencies too — using check-sigil-version-compatible from (sigil deps semver) — and surface the host-vs-dep range conflict error. For now the brief deliberately stops at host packages; extracted libs don't yet have the field, so tightening would break monorepo builds.