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/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.

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.

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.

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.

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.

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.