haskell - Override -Werror when installing from Cabal -


i'm trying install nano-hmac-0.2.0 package (a dependency of package want) hackage using cabal , ghc 6.12.1, fails following error:

data/digest/openssl/hmac.hsc:1:0:     warning: module `prelude' deprecated:                using old package `base' version 3.x.                future ghc versions not support base version 3.x.                should update code use new base version 4.x.  <no location info>:  failing due -werror. 

sure enough, package's .cabal file has following line in it:

  ghc-options:         -wall -werror -o2 -fvia-c 

i'd able override -werror option can install package without manually modifying .cabal file, can't find way work. in particular, tried passing --ghc-options cabal stick -wwarn in ghc's argument list, this:

$ cabal install nano-hmac-0.2.0 -v2 --ghc-options='-wwarn' 

this doesn't want, though; verbose output verifies -wwarn getting added beginning of ghc's argument list, -werror .cabal file appears later , seems override it:

/usr/bin/ghc -wwarn --make -package-name nano-hmac-0.2.0 -hide-all-packages -fbuilding-cabal-package -i -idist/build -i. -idist/build/autogen -idist/build/autogen -idist/build -optp-include -optpdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-3.0.3.2-0092f5a086872e0cdaf979254933cd43 -package-id bytestring-0.9.1.5-125aff5b9d19ec30231ae2684b8c8577 -o -wall -werror -o2 -fvia-c -xforeignfunctioninterface -xbangpatterns -xcpp data.digest.openssl.hmac 

i tried passing --constraint='base >= 4' cabal force use more recent version of base , avoid warning entirely, same failure, , still see following in verbose output:

dependency base ==3.0.3.2: using base-3.0.3.2 

is there way rid of or override -werror coming .cabal file via cabal command line, or stuck modifying .cabal file myself?

is there way rid of or override -werror coming .cabal file via cabal command line, or stuck modifying .cabal file myself?

indeed. there's no way in general. may able override package constraints such warnings go away, however, in general, must modify .cabal file.

these days hackage prevents people uploading packages -werror in .cabal file, issue go away on time.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -