10

I am trying to move a project from cabal to stack. It was painless up until I tried to make alex use a custom wrapper. Now I'm stuck.

I used to use cabal build --alex-options=".." to pass them on, but that option is not there with stack (stack version 1.1.2 at least). Similarly, I used to pass debug flags to happy, but now it no longer seems possible. Is there some other way to achieve this and still use stack?

The point of moving this project is to help collaborators be able to reproduce my build effortlessly (it was already some work to convince them to use Haskell).

orm
  • 2,835
  • 2
  • 22
  • 35
  • AFAIK there's currently no way to pass these flags with `stack`. [These](https://github.com/commercialhaskell/stack/issues/1438) [two](https://github.com/commercialhaskell/stack/issues/593) issues are somewhat related – I suggest you join the discussion and pronounce your need! ;) – sjakobi May 30 '16 at 22:39
  • Another relevant issue: https://github.com/commercialhaskell/stack/issues/652 – mgsloan Jun 02 '16 at 00:30
  • In the event that you only want to pass a debug flag every now and then, you can trick `stack` by: (1) building your project (2) running `happy` manually (`stack exec happy -- `) with your desired options outputting to the same file as `stack` would (3) change something in a module imported in the grammar (4) `stack build` again. This will trigger recompilation, but not re-processing of the grammar (since `stack` will have observed no change in the grammar file). – Alec Jun 07 '17 at 17:07
  • Everything is terrible. – paulotorrens Sep 09 '17 at 08:03

0 Answers0