sway
sway copied to clipboard
Forc doesn't automatically try to build in `--offline` mode if there is no active internet connection
I was banging out some proper LOC on the airplane, as one does, and I ran the sway test suite. I didn't pass --offline, although, on the airplane, I indeed had no network.
Creating a new `Forc.lock` file
Cause: Manifest dependencies do not match
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: failed to clone package 'core' from 'http://github.com/FuelLabs/sway-lib-core': failed to resolve address for github.com: nodename nor servname provided, or not known; class=Net (12)', test/src/e2e_vm_tests/harness.rs:69:46
I think we should either:
- Automatically try
--offlineif no network is present - Provide a message instead of a panic, e.g. Unable to connect to Github. Is your computer connected to the internet?
Good call @sezna - I've opened #900 which I think we might want to solve first. I might remove "good first issue" as it could be a little more involved than a newcomer might expect.
#900's almost addressed now in #1686.
Next blocker is #1787.
Before #1778 has a solution we cannot handle removed dependencies as we wanted with #1686. So I guess that is also a blocker.
As https://github.com/FuelLabs/sway/pull/2366 is about to finalize, I am considering tackling this to offer a complete offline support. For detecting the internet connectivity the most straightforward way seems like checking if we can ping a specific website (it can be github or something else) but this also means we are limited by the uptime of the selected target(s).