mhwombat
mhwombat

Reputation: 8136

How to fix "-no-user-package-conf is deprecated" warnings

Ever since I upgraded to GHC 7.6.2, I'm seeing warnings such as the following:

amy@wombat$ cabal install
Resolving dependencies...
Configuring realta-0.1.0.0...
Building realta-0.1.0.0...
Preprocessing executable 'realta-init' for realta-0.1.0.0...

on the commandline: Warning:
    -no-user-package-conf is deprecated: Use -no-user-package-db instead

on the commandline: Warning:
    -package-conf is deprecated: Use -package-db instead

The warning probably has something do with http://hackage.haskell.org/trac/ghc/ticket/5977. I'd like to fix these warnings, if possible, so that I can compile my code with -Werror. Using the command cabal install -v, I found out that cabal is using this flag with the ghc command, as shown below.

/usr/local/ghc-7.6.2/bin/ghc --make -o dist/build/realta-init/realta-init -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -package-conf  AND SO ON

Is there something I can do to get cabal to use the new flags instead? (Note: In my ~/.cabal/config file, I set user-install: False, which may be relevant.

Upvotes: 1

Views: 247

Answers (1)

Yuras
Yuras

Reputation: 13876

It seems to be fixed in HEAD (at least -package-conf). You can upgrade cabal-install by installing it from the repo or wait for the next release.

Upvotes: 3

Related Questions