[Hackage] #191: Hackage should check for common QA problems in ghc-options

Hackage trac at galois.com
Tue Jan 15 09:51:29 EST 2008


#191: Hackage should check for common QA problems in ghc-options
--------------------------------+-------------------------------------------
  Reporter:  duncan             |        Owner:                 
      Type:  enhancement        |       Status:  new            
  Priority:  normal             |    Milestone:                 
 Component:  HackageDB website  |      Version:  1.2.2.0        
  Severity:  normal             |   Resolution:                 
  Keywords:                     |   Difficulty:  easy (<4 hours)
Ghcversion:  6.8.1              |     Platform:  Linux          
--------------------------------+-------------------------------------------
Old description:

> Simple test that many packages have is dodgy ghc-options, or options that
> would be suitable for development but not release. It should be easy to
> check for these.
>
> Suggestions:
>
> {{{ghc-options: -Wall -Werror}}} is a very bad combination. It means the
> package will break silently as soon as the next version of ghc adds a new
> warning, which generally does happen every major release.
>
> {{{ghc-options: -fasm}}} is unnecessary and breaks on all arches except
> for x86, x86-64 and ppc.
>
> {{{ghc-options: -O}}} is unnecessary since Cabal does that itself and it
> prevents people from configuring with the {{{--disable-optimization}}}
> flag.
>
> {{{ghc-options: -O2}}} may be necessary in some circumstances but people
> should not use it routinely for the same reasons as -O and since -O2 take
> a lot longer to compile most of the time and usually with little benefit.
>

> {{{ghc-options: -ffi}}} or {{{-fffi}}} use extensions:
> ForeignFunctionInterface.
>
> Once #190 is implemented then {{{ghc-options: -fvia-C}}} will be
> unnecessary too.

New description:

 Simple test that many packages have is dodgy ghc-options, or options that
 would be suitable for development but not release. It should be easy to
 check for these.

 Suggestions:

 {{{ghc-options: -Wall -Werror}}} is a very bad combination. It means the
 package will break silently as soon as the next version of ghc adds a new
 warning, which generally does happen every major release.

 {{{ghc-options: -fasm}}} is unnecessary and breaks on all arches except
 for x86, x86-64 and ppc.

 {{{ghc-options: -O}}} is unnecessary since Cabal does that itself and it
 prevents people from configuring with the {{{--disable-optimization}}}
 flag.

 {{{ghc-options: -O2}}} may be necessary in some circumstances but people
 should not use it routinely for the same reasons as -O and since -O2 take
 a lot longer to compile most of the time and usually with little benefit.


 {{{ghc-options: -ffi}}} or {{{-fffi}}} use extensions:
 ForeignFunctionInterface.

 Once #190 is implemented then {{{ghc-options: -fvia-C}}} will be
 unnecessary too.
 ==  ==

Comment (by ross at soi.city.ac.uk):

 I think it's a library issue, specifically `parsePackageDescription` and
 `sanityCheckPackage` in `Distribution.PackageDescription`.  If either of
 these functions fails, the HackageDB upload will fail and show the error.
 If they produce warnings, the upload succeeds but shows the warnings (as
 does check).

 Currently HackageDB has additional fatal errors for
  * version numbers like 00.02 that change when parsed and printed.
 and additional warnings for
  * missing Category, Description, Maintainer or Synopsis field.
  * over-long Synopsis field.
  * exposed modules that use unallocated top-level names in the module
 hierarchy.
 But there are quite a few packages in the archive that triggered these
 warnings.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/191#comment:4>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list