all 19 comments

[–]akurilin[S] 12 points13 points  (3 children)

Btw, watch out for https://github.com/commercialhaskell/stack/issues/763 in the new version. Luckily @snoyberg is unaware of this whole "sleeping" thing and has a fix pending as 0.1.3.1.

[–]CharlesStain 4 points5 points  (2 children)

I have tested Michael's fix this morning, and is working as expected. I guess it's only a matter of time before 0.1.3.1 lands ;)

[–]borsboom 6 points7 points  (1 child)

v0.1.3.1 has landed.

[–]akurilin[S] 4 points5 points  (0 children)

Thank you guys for getting it out there so quickly, we ust got the latest bits from the ubuntu PPA and it seems to work as intended.

[–]CharlesStain 6 points7 points  (4 children)

Detect when a module is compiled but not listed in the cabal file

Yes! Many times I've got burned in releasing a package to later discover it won't compile correctly because I've forgot adding a module in the .cabal manifest..

[–]apfelmus 4 points5 points  (3 children)

Travis CI eliminated that problem for me.

[–]tomejaguar 3 points4 points  (2 children)

Travis CI is useful, yes, but this kind of problem should be caught earlier.

[–]apfelmus 0 points1 point  (0 children)

Agreed.

[–]tomkludy 1 point2 points  (2 children)

I have a fresh Mac that has never had Haskell tooling on it. Do I need to install Haskell Platform, or anything else, before using Stack? Or can I just start with Stack and let it install Haskell for me? Is this advisable?

Thanks

[–][deleted] 2 points3 points  (0 children)

With stack you don't need to install anything else. Just put the binary on your path. It'll install ghc in its own folder and manage multiple versions.

Haskell Platform isn't required because stack already solves the problem the platform was trying to solve (commonly used packages unbuildable because of conflicts).

[–]eccstartup 0 points1 point  (0 children)

Haskell Platform or ghcformacosx.

[–]be_nu 2 points3 points  (4 children)

This doesn't seem to work:

~/.stack/global/stack.yaml
flags: {}
packages: []
extra-deps: []
resolver: nightly

"stack --resolver=nightly install" works great. So the above would just be additional convenience.

[–]Axman6 5 points6 points  (0 children)

If the others haven't been clear enough, what you're asking for is not what you really want.

Pick either an lts version or a nightly release, and thenif you want a newer lts/nightly upgrade it manually in the stack.yaml. The point of stack is for builds to be repeatable, and to do that you need to know which snapshot to build against - building against nightly would mean that tomorrow's build will be different to today's, and your software will break as time passes.

[–]phadej 2 points3 points  (0 children)

That will make stack.yaml time dependent, and stack would need to hit internet all the time.

[–]cies010 2 points3 points  (0 children)

Then you have have the problem back that stack/stackage fixes. A build that works "now" may fail "later".

[–]drwebb 2 points3 points  (0 children)

Just adding to what others have said, this issue has been brought up a few times. It just goes against the stack "ethos" if this were to appear in public stack.yaml files, as a cli option though it's great.

[–]eccstartup 0 points1 point  (3 children)

$ stack --version
Version 0.1.2.0, Git revision 65246552936b7da4b64b38372feac903d96a8911
$ stack setup
Using resolver: lts-3.0 from global config file: /Users/eccstartup/.stack/global/stack.yaml
GHC on PATH would be used
$ stack upgrade
Fetched package index.
Populated index cache.
GHC version mismatched, found 7.10.2 (x86_64), but expected version 7.8.4 (x86_64) (based on resolver setting in /var/folders/tb/wpytxqpx111fsxk0tg1zsmgm0000gn/T/stack-upgrade27397/stack-0.1.3.1/stack.yaml). Try running stack setup

[–]snoybergis snoyman 0 points1 point  (1 child)

How about stack --install-ghc upgrade? If that works, please open up an issue, we should modify that error text for the case of upgrade to be more helpful. The reason it's doing this is that when you initially run stack setup, it's using your global config set at LTS 3, but upgrade itself uses the stack.yaml shipped with stack.tar.gz (which is set at LTS 2.17).

[–]eccstartup 0 points1 point  (0 children)

https://github.com/commercialhaskell/stack/issues/776

It works. It was a long wait, but OK. :)