Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Stack only build one executable? stack build :exe1 doesn't work?

I have multiple executables in one of my Stack projects:

executable m1
  hs-source-dirs:      src
  main-is:             Main1.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.7 && < 5

executable m2
  hs-source-dirs:      src
  main-is:             Main2.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.7 && < 5

I would like to build only one of them at a time. From the documentation and this other question, it would seem that the following command should work:

stack build :m2

but what actually happens is that both executables, m1 and m2, are always built regardless of whether I include the package name, the package type, etc.

What could be causing this?

like image 438
rityzmon Avatar asked Jul 02 '16 21:07

rityzmon


1 Answers

It's not possible at the moment. See https://github.com/commercialhaskell/stack/issues/1406

like image 162
phadej Avatar answered Sep 27 '22 17:09

phadej