jaspervdj / hakyll

A static website compiler library in Haskell
jaspervdj.be/hakyll
Other
2.67k stars 410 forks source link

Problems installing hakyll with stack #475

Open pm5 opened 7 years ago

pm5 commented 7 years ago

Since I've only used cabal before, I'm not sure if this is due to miss-configurations or something else. The followings are the error message I got when I did an stack install hakyll:

Run from outside a project, using implicit global project config
Using resolver: lts-7.0 from implicit global project's config file: [...]/.stack/global-project/stack.yaml

While constructing the build plan, the following exceptions were encountered:

In the dependencies for hakyll-4.8.3.2:
    snap-core-1.0.0.0 must match >=0.6 && <0.10 (latest applicable is 0.9.8.0)
    snap-server-1.0.1.0 must match >=0.6 && <0.10 (latest applicable is 0.9.5.1)

I use Homebrew haskell-stack package on OS X El Capitan.

On the other hand, cabal install hakyll works fine.

tekul commented 7 years ago

Hakyll itself isn't currenly in lts-7 because the latest hackage release has package bounds which are incompatible with other libraries. The latest snap release version in lts-7 (snap-core-1.0.0) is outside the package bounds which hakyll 4.8.3.2 specifies. Cabal is more random since it doesn't use a fixed set of package versions. You probably already have an older snap-core installed so it works.

In the most recent commits, Hakyll seems to have removed the snap dependencies in favour of warp, but there hasn't been a release since that change. I managed to build from head (currently 32e34f435c791) with lts-7.1. You can check out the code and edit the stack.yaml to change the LTS version and it will work without needing an older GHC. So

  1. git clone https://github.com/jaspervdj/hakyll.git
  2. cd hakyll
  3. edit stack.yaml s/lts-5.11/lts-7.1/
  4. stack build

You will also need to reference this Hakyll library from your own project's stack.yaml, for example:

resolver: lts-7.1
packages:
- '.'
-  ../hakyll

Alternatively, you could follow the examples in that FAQ which directly reference a commit on github. Making sure you can build Hakyll locally first is probably a safer option.

jaspervdj commented 7 years ago

I've made a release, this should be easier now.

ThibaudDauce commented 7 years ago

@jaspervdj is it possible to include Hakyll in Stackage again?

I'm using extra-deps: -hakyll-4.9.1.0 but there is a problem with http-conduit, Stack needs the version 2.2 and Stackage LTS 7.10 offers the 2.1.11…

Thanks for the good work!

jaspervdj-luminal commented 7 years ago

@ThibaudDauce Hakyll is available in Stackage Nightly. The next LTS should include Hakyll again.

ThibaudDauce commented 7 years ago

Oh didn't see that! Sorry…

Thanks for the quick response!

sakshamsharma commented 7 years ago

@jaspervdj What's the status on this again? I was recently migrating to LTS 7.x, and am stuck in a similar situation. How do you propose I build with stack right now? I've used nightly-2016-10-31 to build right now, but isn't something I'd prefer. My system installation of ghc-mod etc do not play well with different LTS packages hanging around.

ThibaudDauce commented 7 years ago

I'm currently using resolver: nightly-2016-11-28 and it's working :-)

sakshamsharma commented 7 years ago

Oh. I see. Looking forward to an LTS release. I'd myself look into it if I wasn't so busy.

Btw once again, thanks for this awesome package! I almost shifted over to Hugo last night wow-ed by its awesome available themes, when I realized that it doesn't let you program really, and most stuff is writing in config files, and leaves you restricted to the functions it has provided. I instead started porting the theme over to Hakyll.

jaspervdj commented 7 years ago

Thanks, I appreciate it! Not being able to truly customize behaviour in other static site generators was what led me to create Hakyll.

sakshamsharma commented 7 years ago

This is getting off-topic, but it's something I've noticed as a trend in Haskell. Trying to be a library rather than a package. For instance, this is also the reason I stick to Xmonad over i3wm, or Taffybar over conky/dzen

tekul commented 7 years ago

@sakshamsharma If you don't need the latest Hakyll changes in 4.9.1.0 (they mostly seem to be dependency changes), you can build if you use

extra-deps:
- hakyll-4.9.0.0

in your stack.yaml. I'm still using LTS-7.3.

ThibaudDauce commented 7 years ago

A new Stackage LTS was release today, and Hakyll is still not in… Is there a way to help to get it back in sooner?

tekul commented 7 years ago

@ThibaudDauce Stackage only includes minor version number changes for each major LTS version. It won't be there until LTS 8.

rdesfo commented 6 years ago

can this be closed now? https://www.stackage.org/lts-9.3/package/hakyll-4.9.8.0

juev commented 6 years ago

I think yes, thank you!

Thank's Denis

10 сент. 2017 г., в 18:25, Ryan notifications@github.com написал(а):

can this be closed now? https://www.stackage.org/lts-9.3/package/hakyll-4.9.8.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.