Local package DB doesn't take preference over global DB
I sometime find myself wanting to compile some small test program (say Test.hs) against a locally built Cabal package. Here's what I do:
ghc -c Test.hs -package-conf dist/package.conf.inplace
This doesn't work
Test.hs:4:0:
Failed to load interface for `Data.Text.Lazy.Builder':
Use -v to see a list of the files searched for.
The global version of text gets picked instead of the local one (and in this case the global version lacks the Data.Text.Lazy.Builder module). I expect the package given on the command line to take preference.
Workaround: Bump the version number of the local package.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |