Skip to content

Commit dc6313f

Browse files
committed
Always build exes, due to cabal copy limitation
See haskell/cabal#2780
1 parent e7d28e4 commit dc6313f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/Stack/Build/Execute.hs

+12-7
Original file line numberDiff line numberDiff line change
@@ -1381,13 +1381,18 @@ primaryComponentOptions lp = concat
13811381
]
13821382

13831383
exesToBuild :: LocalPackage -> Set Text
1384-
exesToBuild lp =
1385-
if lpWanted lp
1386-
then exeComponents (lpComponents lp)
1387-
-- Build all executables in the event that no
1388-
-- specific list is provided (as happens with
1389-
-- extra-deps).
1390-
else packageExes (lpPackage lp)
1384+
exesToBuild lp = packageExes (lpPackage lp)
1385+
-- NOTE: Ideally we'd do something like the following code, allowing
1386+
-- the user to control which executables get built. However, due to
1387+
-- https://github.com/haskell/cabal/issues/2780 we must build all
1388+
-- exes...
1389+
--
1390+
-- if lpWanted lp
1391+
-- then exeComponents (lpComponents lp)
1392+
-- -- Build all executables in the event that no
1393+
-- -- specific list is provided (as happens with
1394+
-- -- extra-deps).
1395+
-- else packageExes (lpPackage lp)
13911396

13921397
-- Test-suite and benchmark build components.
13931398
finalComponentOptions :: LocalPackage -> [String]

0 commit comments

Comments
 (0)