You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Global --offline flag to prevent internet access #1594
This flag would skip attempting to download any resources. In the case that a command can still do something reasonable without the download, it should proceed onwards, possibly emitting a warning.
Reacted by Yury Syrovetsky, IC Rainbow, Elie Génard, Greg Horn, Gil Mizrahi, Marvin Hagemeister, SOnion, Alvaro Fernando García, Cody Goodman, Nikolay Artamonov and 2 more
I'd like this flag too. My use case is that I want to manage installing ghc and packages via the system package manager (Nix), and only use stack for the command line interface (e.g. to support using intero from emacs). I want to be able to tell stack to not go behind my back and download/install things.
For context: I just started out learning haskell and usually only code while commuting via train. The internet connection is spotty at best and an offline mode, similar to the one of yarn, where downloads are cached globally would be awesome 👍
I, a former Haskell course TA in China (mainland), under Internet blocking of GFW, need this.
Many students I helped had suffered from:
$ stack new xxx
……
Exception was: HttpExceptionRequest Request {
host = "s3.amazonaws.com"
port = 443
……
Meanwhile I had been suffering from telling them to use domestic mirror (e.g. TUNA’s(howto)) which not always solve the network issue, or to use VPN (or ShadowSocks and to set HTTP proxy for shell).
Activity
anderspapitto commentedon Nov 5, 2016
I'd like this flag too. My use case is that I want to manage installing ghc and packages via the system package manager (Nix), and only use stack for the command line interface (e.g. to support using intero from emacs). I want to be able to tell stack to not go behind my back and download/install things.
ghorn commentedon Nov 6, 2016
My fear is that stack will fail if it doesn't have internet access. Is this ever possible?
marvinhagemeister commentedon Feb 14, 2017
For context: I just started out learning haskell and usually only code while commuting via train. The internet connection is spotty at best and an offline mode, similar to the one of yarn, where downloads are cached globally would be awesome 👍
cblp commentedon Feb 14, 2017
@marvinhagemeister the download already are cached globally. This flag is for the opposite behaviour — fail in presence of internet access.
marvinhagemeister commentedon Feb 15, 2017
Oh I see, sorry for hijacking this thread
decentral1se commentedon Feb 15, 2017
#2982 (comment) is related.
borsboom commentedon Mar 20, 2018
Potential approach: #3813
SnowOnion commentedon Dec 15, 2018
I, a former Haskell course TA in China (mainland), under Internet blocking of GFW, need this.
Many students I helped had suffered from:
Meanwhile I had been suffering from telling them to use domestic mirror (e.g. TUNA’s (howto)) which not always solve the network issue, or to use VPN (or ShadowSocks and to set HTTP proxy for shell).
dbaynard commentedon Dec 15, 2018
@mgsloan is this actually awaiting a PR? If nobody is working on it I'll change to 'help wanted'.
There have been some related changes — e.g. #4385 — and this issue may be a more general way to proceed.
codygman commentedon Jun 22, 2020
I think this might relate to #5319