Ticket #507 (new enhancement)

Opened 4 years ago

Last modified 15 months ago

Improve `cabal info` output for the local package

Reported by: guest Owned by:
Priority: normal Milestone: cabal-install-0.16
Component: cabal-install tool Version: 1.6.0.1
Severity: minor Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: Platform:

Description

Currently

cabal configure --help

displays only the help for the configure command in general. Often I'd like to say what flags are available for the package in question. Currently the only way to do this seems to be to actually look at the .cabal file in question. Something a bit like: ./configure --help which shows you the generic flags like --prefix but also --enable-glade (for example).

Change History

Changed 4 years ago by duncan

  • difficulty changed from unknown to normal

Right. Should not be too hard. After all we do this already in the cabal info output. eg:

$ cabal info darcs
* darcs            (program and library)
    Synopsis:      a distributed, interactive, smart revision control system

[..snip..]

    Source repo:   http://darcs.net/
    Executables:   darcs
    Flags:         curl, curl-pipelining, libwww, http,
                   external-bytestring, external-zlib, haskeline,
                   terminfo, curses, type-witnesses, color, base3

Of course when configuring a single package we want to see the description of each of these flags, if they're available.

We could do similarly for cabal info when run in the current dir with a local .cabal package. Printing it in cabal configure --help is technically a bit harder. Perhaps the help string for --flags should refer to cabal info. Or perhaps that's just to annoying and we should work out how to get it to read the local .cabal file before producing the help output (but not failing if one is not present or if it cannot be parsed).

Changed 3 years ago by duncan

  • summary changed from display available flags based on the .cabal file to `cabal info` for the local package

Changed 2 years ago by duncan

  • summary changed from `cabal info` for the local package to Improve `cabal info` output for the local package

The cabal info command will now work for the local package. Just run cabal info ./ or cabal info blah.cabal using the the local .cabal filename.

Note that it does not give the description of the package flags, just their name.

Sun Feb 13 19:41:50 GMT 2011  Duncan Coutts <duncan@community.haskell.org>
  * Add a new module for handling user targets
  This will allow us to increase the range of targets that cabal
  commands can support. The new ones are local directory targets,
  local cabal files, local tarballs and remote tarballs by URL.
  Also a better way of doing the special "world" target.

Sun Feb 13 19:46:27 GMT 2011  Duncan Coutts <duncan@community.haskell.org>
  * Partial rewrite of cabal list and info commands
  The new user target system requires a change in how cabal info works.
  Instead of just giving package names and looking them up in the
  available package index, we can now specify names with versions or
  version constraints which means we want the info to be about that
  version in particular. We now list many installed and available
  versions and mark which ones are preferred or not. Also fix a bug
  for packages that are only installed, not available.

Changed 15 months ago by kosmikus

  • difficulty changed from normal to easy (<4 hours)
  • milestone set to cabal-install-0.16
Note: See TracTickets for help on using tickets.