Ticket #387 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

`cabal check` does not complain about incorrect `Cabal-Version` field

Reported by: Deewiant Owned by: ross@…
Priority: normal Milestone: HackageDB
Component: hackageDB website Version: HEAD
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.10.1 Platform:

Description

The validity of the Cabal-Version field is not verified in any way, making it all too easy to accidentally use a feature which isn't actually present in all the versions of Cabal the field allows.

Sounds like something cabal check should do.

Change History

Changed 5 years ago by duncan

  • milestone set to Cabal-1.6

In particular Cabal-1.6 added new syntax for:

  • version ranges foo == 1.0.*
  • source control repos
  • wildcards in the data-files and extra-source-files fields.
  • and we should allow new licenses, requiring cabal >= 1.4

The only tricky one to detect at the moment is the version ranges as they are not reflected in the abstract syntax tree.

Changed 4 years ago by duncan

  • component changed from Cabal library to hackageDB website

Should all be done now. If we upgrade hackage to use Cabal-1.7 then these checks will be enforced by hackage.

Fri Nov 28 17:05:13 GMT 2008  Duncan Coutts <duncan@haskell.org>   
  * Distinguish version wild cards in the VersionRange AST
  Rather than encoding them in existing constructors.
  This will enable us to check that uses of the new syntax
  are flagged in .cabal files with cabal-version: >= 1.6

Tue Dec  2 13:14:59 GMT 2008  Duncan Coutts <duncan@haskell.org>
  * Add check for use of "build-depends: foo == 1.*" syntax
  It requires Cabal-1.6 or later.

Tue Dec  2 13:39:54 GMT 2008  Duncan Coutts <duncan@haskell.org>
  * Add checks for file glob syntax
  It requires cabal-version: >= 1.6 to be specified

Tue Dec  2 13:50:00 GMT 2008  Duncan Coutts <duncan@haskell.org>
  * Fix message in the extra-source-files field check

Tue Dec  2 15:54:10 GMT 2008  Duncan Coutts <duncan@haskell.org>
  * Do the cabal version check properly.
  Instead of matching on the actual expression ">= x.y" we use the
  sematic view of the version range so we can do it precisely.
  Also use foldVersionRange to simplify a couple functions.

Tue Dec  2 17:27:42 GMT 2008  Duncan Coutts <duncan@haskell.org>
  * Add checks for new and unknown licenses

Changed 4 years ago by duncan

  • owner set to ross@…
  • milestone changed from Cabal-1.6 to HackageDB

Changed 4 years ago by ross@…

  • status changed from new to closed
  • resolution set to fixed

recompiled with Cabal-1.7

Changed 4 years ago by duncan

Thanks Ross!

Note: See TracTickets for help on using tickets.