[Question] Is it possible to run this without `stack` and just plain `ghc`?
schuelermine opened this issue · 7 comments
When I run the extension, it seems to execute commands that contain "stack", but I don't have stack installed. Subsequently, the whole thing fails. Is this because I don't have stack installed? Can I mitigate this?
It's probably because your project has a stack.yaml
, in which case it's assumed that you have a stack project. In this case, try changing ghcSimple.replCommand
to something like cabal v2-repl
or whatever command that starts a repl for your project.
If that wasn't the case, please provide more information about your setup and your workspace folders.
By the way, may I ask where you heard about vscode-ghc-simple? It seems that I got a rush of bug reports and I'd like to see if it's been brought up somewhere, and if I can add to the discussion.
I'm not running the extension in an opened folder at all, and I don't even have cabal. I just have a manually downloaded GHC 8.10.1 binary. The error log says this:
Starting GHCi with: "stack --no-terminal --color never exec ghci"
(Under default cwd)
-> :set prompt ""
|> :set prompt-cont ""
ghci | Downloading lts-16.2 build plan ...
ghci | RedownloadFailed Request {
ghci | host = "raw.githubusercontent.com"
ghci | port = 443
ghci | secure = True
ghci | requestHeaders = []
ghci | path = "/fpco/lts-haskell/master//lts-16.2.yaml"
ghci | queryString = ""
ghci | method = "GET"
ghci | proxy = Nothing
ghci | rawBody = False
ghci | redirectCount = 10
ghci | responseTimeout = ResponseTimeoutDefault
ghci | requestVersion = HTTP/1.1
ghci | }
ghci | "C:\\sr\\build-plan\\lts-16.2.yaml" (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("Connection","keep-alive"),("Content-Length","14"),("Content-Security-Policy","default-src 'none'; style-src 'unsafe-inline'; sandbox"),("Strict-Transport-Security","max-age=31536000"),("X-Content-Type-Options","nosniff"),("X-Frame-Options","deny"),("X-XSS-Protection","1; mode=block"),("Content-Type","text/plain; charset=utf-8"),("Via","1.1 varnish (Varnish/6.0)"),("X-GitHub-Request-Id","947C:6F5D:59BF33:6DE5A4:5EEF6EF0"),("Accept-Ranges","bytes"),("Date","Sun, 21 Jun 2020 14:30:21 GMT"),("Via","1.1 varnish"),("X-Served-By","cache-hhn4033-HHN"),("X-Cache","HIT, MISS"),("X-Cache-Hits","1, 0"),("X-Timer","S1592749821.031911,VS0,VE94"),("Vary","Authorization,Accept-Encoding"),("Access-Control-Allow-Origin","*"),("X-Fastly-Request-ID","b15a77da06804a1e73ae08f601013b5344115bc3"),("Expires","Sun, 21 Jun 2020 14:35:21 GMT"),("Source-Age","0")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose})
Error checking c:\Users\Debug User\Documents\Code\hextra\src\Extra.hs: stream closed
Error providing range type: stream closed
About how I heard about this extension, I don't know if it's been brought up somewhere, but I used it a while ago when I did have stack and it worked fine, and I've revisited it after starting to use Haskell again. I found the extension originally by searching "haskell" in the VS Code marketplace.
I'm currently on VS Code Insiders 1.47.0 Windows 10 Pro 2004 x64 GHC 8.10.1
Ok thanks for the information. It seems that the detection logic is faulty. I'll take a look.
Thanks for the information on where you saw this extension as well.
It also doesn't work if I specify the full path of GHC in the replCommand
setting
I have the same problem as shown above (404 from fpco).
I have the same problem too. GHC simple loads some projects but fails to load others, for whatever reason.
The aforemention command did not work for me either, but it may be just me setting it up wrongly.
Actually I have just tested loading two exact copies of a code, and the original file would load while the other one does not, huh