Foundry.Context.LockFile (foundry v0.1.2)

Copy Markdown

Manages the context lock file (.foundry/context.lock) which tracks whether the cached project context is fresh.

The lock file stores a SHA256 hash of all lib//*.ex and test//*.ex files. If any of these files change, the hash becomes stale.

Summary

Functions

check(project_root)

@spec check(String.t()) :: :ok | {:error, :stale | :missing}

compute_hash(project_root)

@spec compute_hash(String.t()) :: String.t()

write(project_root)

@spec write(String.t()) :: :ok