commercialhaskell / commercialhaskell/stack

New c files generated by c2hs are ignored when running stack ghci

Open
#4,287 3 comments 0 reactions 0 assignees View on GitHub
component: ghci type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments

Some preprocessors may produce c files (like c2hs and hsc2hs). Stack currently seems to be unable to handle those unlike cabal (see https://github.com/haskell/cabal/pull/2467).

Building with stack works, so it's only the `stack ghci` that's having problem here.

### Steps to reproduce

See https://github.com/CthulhuDen/cbits-ordering/tree/c2hs (c2hs branch) which runs with `cabal new-repl` but not with `stack ghci`. Running both commands with -v shows that cabal includes `dist-newstyle/build/x86_64-linux/ghc-8.4.3/cbits-ordering-0.0.0/build/Lib.chs.o`.

### Stack version

```
$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
```

### Method of installation

* Official binary, downloaded from stackage.org or fpcomplete's package repository

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.