Ticket #813 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 2 years ago

Cabal should warn if the Cabal-Version range is too lax

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.10.1.0
Severity: normal Keywords:
Cc: cabal@… Difficulty: unknown
GHC Version: Platform:

Description

I have a Cabal file that contains the line

Cabal-Version: >=1.6

and then a test section:

Test-Suite test-mypkg

Cabal should issue a warning like:

Test-Suite feature requires Cabal-Version: >=1.10.
Your Cabal version range ">=1.6" is too lax.

Change History

Changed 2 years ago by duncan

When you run cabal check it does issue a warning:

The following errors will cause portability problems on other environments:
* The 'test-suite' section is new in Cabal 1.10. Unfortunately it messes up
the parser in older Cabal versions so you must specify at least
'cabal-version: >= 1.8', but notethat only Cabal 1.10 and later can actually
run such test suites.

We do not however want to require that all .cabal files with test-suites specify cabal-version: >= 1.10 because this would then prevent such packages from building with older Cabal versions. Cabal-1.8 will just ignore unknown sections, so it can continue to build packages that have test-suite sections.

Changed 2 years ago by duncan

Unless there are any other reasons / arguements for why we should warn, I'm inclined to close this ticket.

Changed 2 years ago by duncan

  • status changed from new to closed
  • resolution set to wontfix
Note: See TracTickets for help on using tickets.