Description
In Nix environments it isn't possible to hit the network during a build unless you have a hash of the entity you are downloading — so as to prove what you downloaded is exactly what you expected and did not change.
In these environments it is still possible to download dependencies for a Spago project because the lockfile contains a hash for every entry. However, if you then run spago build --offline
the build will fail because Spago wants the registry and registry-index repositories present.
This is problematic because we can't clone these repositories in the offline environment — we'd need to hash the registry and registry-index and keep those hashes up to date so as to download and place them where Spago wants for the build.
But the registry and regsitry-index don't contain any information beyond what is already captured in the lockfile — at least for performing a build (you would still need them for things like spago install
, but you'd never do that in an offline environment).
My request is that spago build
, spago test
, and other commands that do not require information beyond what is in the lockfile also do not require the registry and registry-index to be present, since those are difficult to procure in an offline environment like CI. If that is a bit thorny, then at least I'd like to relax the repos being present requirement when using the --offline
flag in a build.
Activity