rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.31k stars 94 forks source link

How to setup env vars especially for proxy? #487

Closed anqurvanillapy closed 4 years ago

anqurvanillapy commented 4 years ago

I'm behind a company firewall and on Windows where:

set HTTP_PROXY=http://host:ip
set HTTPS_PROXY=http://host:ip

works for me. But how can I set up these variables for the plugin? Since clicking on Haskell -> Update settings and restart REPLs gives me timeout exception.

Information:C:/Users/xxx/AppData/Roaming/local/bin/stack.exe build --fast --no-interleaved-output --test --bench --no-run-tests --no-run-benchmarks --only-dependencies
Information:Exception while reading snapshot from lts-14.15 (c5e673e5723931b64ef2eb5004f6d9ea3c95b58d48388dbc4de6f66b97c81f7a,525662):
Information:HttpExceptionRequest Request {
   host                 = "raw.githubusercontent.com"
   port                 = 443
   secure               = True
   requestHeaders       = [("User-Agent","Haskell pantry package")]
   path                 = "/commercialhaskell/stackage-snapshots/master/lts/14/15.yaml"
   queryString          = ""
   method               = "GET"
   proxy                = Nothing
   rawBody              = False
   redirectCount        = 10
   responseTimeout      = ResponseTimeoutDefault
   requestVersion       = HTTP/1.1
Information: (InternalException (HostCannotConnect "raw.githubusercontent.com" [Network.Socket.connect: <socket: 704>: failed (Connection timed out (WSAETIMEDOUT))]))

I tried to put the settings of variables of STACK_ROOT and HTTP_PROXY by using the system autorun but they were not recognized by the plugin's stack-summoning.

Off-topic bonus: It also notices a stty command not found error triggered by stack.

anqurvanillapy commented 4 years ago

Ooops, so that actually can be tuned via https://www.jetbrains.com/help/idea/settings-path-variables.html. I'm closing this and BTW the stty not recognized issue is upstream with stack and terminal-size.