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

Update doc #4252

snoyberg opened this issue Aug 22, 2018 · 9 comments

Update doc #4252

snoyberg opened this issue Aug 22, 2018 · 9 comments


Copy link

@snoyberg snoyberg commented Aug 22, 2018

This is a long user guide doc that I wrote quite a while ago. I'm sure it could be improved significantly now that we have a lot more user experience with where people get tripped up with Stack.

Another possibility: maybe people are getting their information on Stack in other ways, and this document is no longer necessary. I'd appreciate feedback either way on this.

In the meanwhile, I'm going to add a comment to the top of the doc that it deserves getting updated.

snoyberg added a commit that referenced this issue Aug 22, 2018
Copy link

@ahidalgob ahidalgob commented Jun 18, 2019

I think the --solver option in External Dependencies is out of date. I get Invalid option `--solver', and the previous init command does not suggests such switch (only --omit-packages and --resolver)

$ stack --version
Version 2.1.1, Git revision f612ea85316bbc327a64e4ad8d9f0b150dc12d4b (7648 commits) x86_64 hpack-0.31.2

I guess the same goes for the stack solver section.

Thank you!

Copy link

@friedbrice friedbrice commented Jun 25, 2019

Similar, but different from @ahidalgob's issue.

In Existing projects > stack init > External Dependencies, stack init --force --solver is accepted as a valid Stack command, but it fails with error when used in conjunction with cabal-install version 2.4.

A work-around is to use cabal install --dry-run to list the results of the dependency solver, and then manually modify your stack.yaml, adding the packages missing from Stackage.

Using Stack version, Git revision 43ff632.

Copy link

@RogueToad RogueToad commented Jul 2, 2019

Not an issue - just thought it worth mentioning that I found the guide very helpful . There's a lot of misinformation around which this helped clear up for me, but bringing it up to date would be nice.

Copy link

@supermacro supermacro commented Nov 24, 2019

Hey, I'm new to Stack and found the guide overall really helpful. One thing I did not find in the docs, however, was further info on the distinction between src/Lib.hs and app/Main.hs. I did find this SO post, though which cleared things up for me.

I would be up for opening a PR to include this information somewhere in the docs!

Copy link

@ronwinn ronwinn commented Mar 7, 2020

Appreciate your effort!
Could you please add information on how to specify where stack new is placing the projects?
At the moment it looks like it creates all projects on the top level of home, which is very impractical imho.
Little details like this are necessary to give newbs the confidence to use the tools without repercussions like having to edit paths in dozens of files to keep the project working if they want to move it to a different location.
So far I could not find this information, so I'm stuck.

Copy link

@sigvaldm sigvaldm commented Mar 27, 2020

Thanks for the guide. Such things are crucial for us who want to get into developing with Haskell. I try to create a new project as described in the quick start, but when I type stack build i get '

Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?

and when I type stack init I get:

 "/home/sigvald/.stack/build-plan/lts-15.5.yaml" (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("Connection","keep-alive"),("Content-Length","15"),("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"),("Via","1.1 varnish (Varnish/6.0)"),("X-GitHub-Request-Id","4642:2D30:1C693:1ECCB:5E7E2237"),("Accept-Ranges","bytes"),("Date","Fri, 27 Mar 2020 15:56:41 GMT"),("Via","1.1 varnish"),("X-Served-By","cache-osl6535-OSL"),("X-Cache","HIT, MISS"),("X-Cache-Hits","8, 0"),("X-Timer","S1585324601.143096,VS0,VE333"),("Vary","Authorization,Accept-Encoding"),("Access-Control-Allow-Origin","*"),("X-Fastly-Request-ID","926344e902ae05ab09d1e24c6be8a4961cdb421a"),("Expires","Fri, 27 Mar 2020 16:01:41 GMT"),("Source-Age","0")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose})

Any advice?

Copy link

@friedbrice friedbrice commented Mar 27, 2020

@sigvaldm Can you put your project (or a minimal example) on github and link to it?

Copy link

@sigvaldm sigvaldm commented Mar 27, 2020

@friedbrice: Think I just found the error myself. I had stack 1.7. Doing stack upgrade and then trying stack init and stack build seemed to do the trick. (My project is just the first thing I got when running stack new project. Just trying this out. Looks like a nice tool.)

Copy link

@mostalive mostalive commented May 6, 2020

Came to the guide from a search. Coming back to haskell / stack after a while. The guide seems useful , thanks. I didn't know about package.yaml, that helped (I did stack new myproject hspec - that creates a .cabal file, not package. yaml. It doesn't rebuild when only a test changes. It took a while to figure out, and I can't find the relevant issues for stack that I saw late last night. Will try again later).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants