Stack deleting lines in Cabal file.

55 views
Skip to first unread message

aditya siram

unread,
Dec 8, 2017, 11:25:16 AM12/8/17
to haskell-stack
Hi all,

Stack 1.5.1 appears to be deleting lines from a project's .cabal file. For example, if you run `stack build` on a standard Scotty web app [1] the build dies with:
../haskell-rest-demo/app/Main.hs:6:1: error:
   
Failed to load interface for Web.Scotty
   
Use -v to see a list of the files searched for.

If I then add a scotty dependency in the appropriate place [2] and re-run `stack build` that line actually disappears from the cabal file.

Before I opened an issue I just wanted to make sure I wasn't missing something obvious.

Apologies if this is a known issue.

Thanks!
-deech

[1] https://github.com/mvolkmann/haskell-rest-demo
[2] https://github.com/mvolkmann/haskell-rest-demo/blob/master/rest-demo.cabal#L43

Christopher Allen

unread,
Dec 8, 2017, 12:02:19 PM12/8/17
to aditya siram, haskell-stack
Is there a package.yaml in the project? If so, it's using hpack w/ the
package.yaml.

The project you linked is also using hpack. The Cabal files are
checked into source control as a courtesy to Cabal and Hackage users.

Delete the package.yaml and use the Cabal file solely or edit the
package.yaml instead.

Cf. https://github.com/sol/hpack
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-stack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-stac...@googlegroups.com.
> To post to this group, send email to haskel...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haskell-stack/9b3eee20-46f8-4a93-9218-7124d13d20e6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Chris Allen
Currently working on http://haskellbook.com

aditya siram

unread,
Dec 8, 2017, 1:00:13 PM12/8/17
to haskell-stack
I upgraded to 1.6.1 and that fixed it.
Thanks!
Reply all
Reply to author
Forward
0 new messages