DeterminateSystems / riff

Riff automatically provides external dependencies for Rust projects, with support for other languages coming soon.
https://riff.sh
Mozilla Public License 2.0
486 stars 13 forks source link

`--offline` for shell and run #62

Closed Hoverbear closed 2 years ago

Hoverbear commented 2 years ago

Adds an --offline flag which removes almost all of our network use (including in cargo metadata --offline and nix flake lock --offline), however attempting to do nix develop --offline lead to a nix bootstrap, which is undesirable.

I'm a bit confused by this as I assumed nix flake lock --offline would actually fail, but I guess it's using my local channel?

I believe if we stored the derivative flake.nix/lock in a consistent place, we could support true --offline after the first run.

Perhaps this ticket should only imply FSM specific networking, but then adding a less specific --offline flag (which is a legitimate want) might be hard.

linear[bot] commented 2 years ago
DS-275 `--offline` for `shell` and `run`

This would be passed to `DependencyRegistry` construction to communicate that it should be done without reaching the network. It could also read from `FSM_OFFLINE`. This is, primarily, for testing. We could alternatively use `FSM_OFFLINE` as a secret dev env, but I'd prefer to not keep secrets. Using `--offline` should imply `--disable-telemetry`