Ticket #624 (closed defect: fixed)

Opened 3 years ago

Last modified 17 months ago

"cabal haddock" should not break my build

Reported by: AntoineLatter Owned by:
Priority: normal Milestone: Cabal-1.8
Component: Cabal library Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description

See GHC bug 3799:  http://hackage.haskell.org/trac/ghc/ticket/3799

With the package "syb-with-class" executing "cabal haddock" regenerates the .hi files and most of the .o files. It doesn't, however regenerate HSsyb-with-class.6.1.0.o.

Since syb-with-class exports top-level declarations generated by template haskell, they have a different name every time we compile.

So my (regenerated) .hi files exports names not in my .o file. If this happens during a "cabal install" we package up haddock's .hi files with the previously built HSsyb-with-class.6.1.0.o.

I'm not sure if this is a Cabal bug or a haddock bug (or a GHC bug?). Either way I thought I'd post it here so people are aware of it.

The work around is to turn off the auto-haddock option.

Change History

Changed 3 years ago by duncan

  • milestone set to Cabal-1.8

Agreed. We should make sure we prevent haddock from stomping over existing .o or .hi files. The quick way would be to give it dummy hi and o dirs. A better way would be to get haddock to pick up the existing files, or if there are no existing files to always use bytecode and to never generate .hi or .o files.

Changed 3 years ago by duncan

Patch in Cabal HEAD. Please test. If we're quick we might be able to get this into a Cabal release to go with ghc 6.12.2.

Thu Apr  8 23:51:56 BST 2010  Duncan Coutts <duncan@haskell.org>
  * Workaround the fact that haddock stomps on our precious .hi and .o files
  When using "haddock --optghc-XTemplateHaskell" haddock will write out .o
  and .hi files. This is bad because it replaces the ones we previously
  built. This results in broken packages later on. Of course haddock
  should not do this, it should write temp files elsewhere. The workaround
  is to tell haddock to write the files to a temp dir.

Changed 3 years ago by AntoineLatter

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

with cabal head and cabal-install HEAD, running "cabal haddock" doesn't update the timestamps on any of my .o or .hi files.

Also, "cabal install happstack" works with documentation generation turned on.

Changed 17 months ago by elga

Changed 17 months ago by edouard

Portabilite, portage, transfert de numero de telephone, un code Rio ou Releve d'Identite Operateur peut presenter differentes appellations. Toutefois, l'objectif reste un meme: changer d'operateur de telephonie mobiun tout en gardant son numero de telephone actuel.  rio bouygues

Note: See TracTickets for help on using tickets.