Skip to content
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

Forc doesn't automatically try to build in --offline mode if there is no active internet connection #895

Closed
Tracked by #2349
sezna opened this issue Mar 7, 2022 · 4 comments · Fixed by #2860
Closed
Tracked by #2349
Assignees
Labels
enhancement New feature or request forc P: high Should be looked at if there are no critical issues left

Comments

@sezna
Copy link
Contributor

sezna commented Mar 7, 2022

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:

  1. Automatically try --offline if no network is present
  2. Provide a message instead of a panic, e.g. Unable to connect to Github. Is your computer connected to the internet?
@sezna sezna added enhancement New feature or request good first issue Good for newcomers forc labels Mar 7, 2022
@sezna sezna moved this to Todo in Fuel Network Mar 7, 2022
@mitchmindtree
Copy link
Contributor

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.

@mitchmindtree
Copy link
Contributor

#900's almost addressed now in #1686.

Next blocker is #1787.

@kayagokalp
Copy link
Member

Before #1778 has a solution we cannot handle removed dependencies as we wanted with #1686. So I guess that is also a blocker.

@kayagokalp
Copy link
Member

As #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).

@kayagokalp kayagokalp moved this from Todo to In Progress in Fuel Network Sep 26, 2022
Repository owner moved this from In Progress to Done in Fuel Network Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc P: high Should be looked at if there are no critical issues left
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants