Ticket #639 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 17 months ago

'source-repository' should not necessarily require 'cabal-version >= 1.6'

Reported by: andersk Owned by:
Priority: normal Milestone: _|_
Component: Cabal library Version: HEAD
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description

Distribution.PackageDescription.Check has this check:

    -- check use of "source-repository" section
  , checkVersion [1,6] (not (null (sourceRepos pkg))) $
      PackageDistInexcusable $
           "The 'source-repository' section is new in Cabal-1.6. "
        ++ "Unfortunately it messes up the parser in earlier Cabal versions "
        ++ "so you need to specify 'cabal-version: >= 1.6'."

However, I’ve found that Cabal 1.2 can successfully parse a cabal file with a 'source-repository' section (with a warning), _if_ that section is at the end of the file. Perhaps the check could be loosened to allow (and suggest) this?

Change History

Changed 3 years ago by duncan

  • milestone set to _|_

I'm not convinced it is worth it. At the place we do the above check, it's already been parsed and we do not know where in the file the section appears.

Changed 3 years ago by andersk

This issue seems to have led to a regression in the extensible-extensions package:  http://hackage.haskell.org/trac/ghc/ticket/3931.

Changed 3 years ago by duncan

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

The extensible-extensions issue was solved by not requiring a later cabal version. It is not critical that packages designed for maximum backwards compatibility be able to specify source repos.

Changed 17 months ago by elga

Note: See TracTickets for help on using tickets.