-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --offline
flag
#575
Comments
@f-f Is this a feature you'd be willing to accept before the Registry work gets done? |
@JordanMartinez yes, definitely! I think it's a big enough feature that it'd be worth discussing possible approaches before going for the code, either here or in the |
Let's keep the discussion here for the time being because not everyone is on Discord and this change can affect a lot of people. Correct me if I'm wrong, but the idea behind this flag is to make If we look at the commands we can pass to
Here are the commands whose behavior could be affected by an
I think supporting the |
Yes! We should try to provide sane defaults, print warnings when we make assumptions about things that we could usually verify through a network call, and if we can't do even the bare minimum we just fail with "sorry, we really need to talk to the internet for this one"
"Being offline" is really an operational mode for the program, and it's going to affect a lot of things, I'd say so many that it should really be a global flag, so that we are able to check for it easily and without rewiring flags if we figure out that we need it in a new place. For example, anything that evaluates Dhall (so really the majority of the commands we have) will need to know the value of the flag, and will need to figure out what to do when Dhall wants to make network calls. I think a good start for this would be to:
We could already ship an |
Currently there's no way to ensure that
spago
does not connect to the network. Even if all dependencies are installed,--no-install
is set, there's still traffic.This makes
spago
unusable in pure CI environments, such asnix
. And it would be nice if that was not the case.The text was updated successfully, but these errors were encountered: