commercialhaskell / commercialhaskell/stack

stack repl fails to pass flags for native libraries

Open
#4,855 6 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

We have received a number of bug reports from stack users indicating that stack is failing to pass the correct `-l` options when invoking the repl target.

* https://gitlab.haskell.org/ghc/ghc/issues/16770
* https://gitlab.haskell.org/ghc/ghc/issues/14278
* https://gitlab.haskell.org/ghc/ghc/issues/16709

@bgamari speculates [the cause](https://gitlab.haskell.org/ghc/ghc/issues/16709#note_203014):

> I rather suspect that this may be a stack bug: stack seems to be ignoring your package's pkgconfig-depends when building its ghc command line. By contrast, cabal repl on my machine passes -lpython3.5m, as one would expect.

It's possible that this is intentional because of the component merging logic in `stack repl`.
If there is some reason these flags are not passed then it would be good to fail more gracefully so that we stop getting upstream bug reports.

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.