building only the docs

Do you expect this to work? <setup> clean <setup> configure <setup> haddock <setup> install I get, e.g.: $ runghc Setup install Installing: /home/peteg/lib/HaXml-1.13.2/ghc-6.6.1 Installing: /home/peteg/bin Setup.hs: Error: Could not find module: Text.ParserCombinators.HuttonMeijerWallace with any suffix: ["hi"] whereas if I swap "build" for "haddock" line the "install" line does not complain about the lack of docs to install. cheers peter

On Mon, Dec 24, 2007 at 08:30:32AM +0700, Peter Gammie wrote:
Do you expect this to work?
<setup> clean <setup> configure <setup> haddock <setup> install
I get, e.g.:
$ runghc Setup install Installing: /home/peteg/lib/HaXml-1.13.2/ghc-6.6.1 Installing: /home/peteg/bin Setup.hs: Error: Could not find module: Text.ParserCombinators.HuttonMeijerWallace with any suffix: ["hi"]
whereas if I swap "build" for "haddock" line the "install" line does not complain about the lack of docs to install.
Related to this, there'e no way to install only the docs or only the binaries when both are built, as far as I know. This isn't a huge problem, but it ought to be easy to fix and it would be nice to have. It would have made things slightly simpler for me when building separate -doc and -dev Debian packages for Cabal libraries, and it also would mean we could do the right thing in GHC's "make install-docs". Thanks Ian

On Mon, 2007-12-24 at 12:10 +0000, Ian Lynagh wrote:
On Mon, Dec 24, 2007 at 08:30:32AM +0700, Peter Gammie wrote:
Do you expect this to work?
<setup> clean <setup> configure <setup> haddock <setup> install
I get, e.g.:
$ runghc Setup install Installing: /home/peteg/lib/HaXml-1.13.2/ghc-6.6.1 Installing: /home/peteg/bin Setup.hs: Error: Could not find module: Text.ParserCombinators.HuttonMeijerWallace with any suffix: ["hi"]
whereas if I swap "build" for "haddock" line the "install" line does not complain about the lack of docs to install.
Related to this, there'e no way to install only the docs or only the binaries when both are built, as far as I know. This isn't a huge problem, but it ought to be easy to fix and it would be nice to have.
It would have made things slightly simpler for me when building separate -doc and -dev Debian packages for Cabal libraries, and it also would mean we could do the right thing in GHC's "make install-docs".
cabal install --docs --everything-else What would the user interface be? Are there any other categories than docs? Is it additive, subtractive? Can the default be explained in terms of the new proposed flags? Duncan

On 30/12/2007, at 2:00 AM, Duncan Coutts wrote:
cabal install --docs --everything-else
What would the user interface be? Are there any other categories than docs? Is it additive, subtractive? Can the default be explained in terms of the new proposed flags?
Interesting questions. I see in a related discussion with Bryan O'Sullivan you say:
By the way, is there a reason why a .cabal file can specify multiple executables, but only one library? LLVM wants to be built in a modular fashion to minimise the number of dependencies, and it would be nice to be able to put llvm-common, llvm-core, and llvm-engine all in a single .cabal file, each with different ld-options.
It's because we don't yet support building collections of related packages very well. There have been suggestions that when we do support that better that there should only be one library or executable per .cabal file.
So what we really want is a way to say (at least) build/haddock/ install for each package/executable we're interested in as well. HaXml is one example, where I don't really care about the executables and just want the libraries + docs. I expect you and Iain can draw on your experience as distro packagers and thrash this out better than I can. (No pressing need from me, I'm just armchairing again.) cheers peter

On Sat, Dec 29, 2007 at 07:00:49PM +0000, Duncan Coutts wrote:
On Mon, 2007-12-24 at 12:10 +0000, Ian Lynagh wrote:
Related to this, there'e no way to install only the docs or only the binaries when both are built, as far as I know. This isn't a huge problem, but it ought to be easy to fix and it would be nice to have.
Oh, another thing that would make my life a lot easier is a flag for whether or not to install the license file.
It would have made things slightly simpler for me when building separate -doc and -dev Debian packages for Cabal libraries, and it also would mean we could do the right thing in GHC's "make install-docs".
cabal install --docs --everything-else
What would the user interface be? Are there any other categories than docs?
OTTOMH, there's a tree of things like: all docs haddock-interfaces html license binaries library executables executable=foo executable=bar although we don't necessarily have to be as granular as that.
Is it additive, subtractive? Can the default be explained in terms of the new proposed flags?
As long as docs, license and binaries can be (de)selected individually I don't really mind. If you want a concrete suggestion, we could have --foo and --no-foo for each thing, with the default being --all and the commandline being processed left-to-right, e.g. cabal install --no-haddock-interfaces --docs --no-html would install all (which wouldn't actually contain anything) docs (which wouldn't actually contain anything) haddock-interfaces license everything under binaries Thanks Ian

Could someone file a feature request please with a sketch of a proposed user interface. Duncan On Fri, 2008-01-04 at 16:49 +0000, Ian Lynagh wrote:
On Sat, Dec 29, 2007 at 07:00:49PM +0000, Duncan Coutts wrote:
On Mon, 2007-12-24 at 12:10 +0000, Ian Lynagh wrote:
Related to this, there'e no way to install only the docs or only the binaries when both are built, as far as I know. This isn't a huge problem, but it ought to be easy to fix and it would be nice to have.
Oh, another thing that would make my life a lot easier is a flag for whether or not to install the license file.
It would have made things slightly simpler for me when building separate -doc and -dev Debian packages for Cabal libraries, and it also would mean we could do the right thing in GHC's "make install-docs".
cabal install --docs --everything-else
What would the user interface be? Are there any other categories than docs?
OTTOMH, there's a tree of things like:
all docs haddock-interfaces html license binaries library executables executable=foo executable=bar
although we don't necessarily have to be as granular as that.
Is it additive, subtractive? Can the default be explained in terms of the new proposed flags?
As long as docs, license and binaries can be (de)selected individually I don't really mind.
If you want a concrete suggestion, we could have --foo and --no-foo for each thing, with the default being --all and the commandline being processed left-to-right, e.g.
cabal install --no-haddock-interfaces --docs --no-html
would install
all (which wouldn't actually contain anything) docs (which wouldn't actually contain anything) haddock-interfaces license everything under binaries
participants (3)
-
Duncan Coutts
-
Ian Lynagh
-
Peter Gammie