Description
The registry-compliant Spago specifies dependencies as either entries in a package set or via explicit version bounds of the form >=X.Y.Z <X.Y.Z
, where libraries published to the registry must use version bounds. This means that it's no longer possible to tell the exact versions that a project is using from its package set alone.
Lockfiles solve this problem by listing the exact resolutions a project is currently using. They'll also typically list other metadata sufficient for the package manager to produce a build from the lockfile alone, such as:
- the dependency version (a registry version, a ref, ...)
- the location of the package source (registry packages can omit this, but we'd need this if the package is overridden, such as to a fork)
- the hash of the package contents (commonly called "integrity", and used to ensure the code downloaded exactly matches what the lockfile expects.)
There may be other fields we choose to support, if they are useful to Spago. Selfishly, I'm most interested in the lockfile storing package hashes (which we can get from the registry, or compute in the case of an override) because this is necessary for Nix tooling to be able to support Spago projects without generating additional files. However, lockfiles are useful beyond just making it easier for Nix tools to work.
Activity