Issue 1720 Cannot build docs for darcs 2.3.1

Title Cannot build docs for darcs 2.3.1
Priority bug Status resolved
Milestone 2.4.x Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, duncan, fx, jaredj, kowey, tux_rocker, twb, uzytkownik
Assigned To
Topics Devel, Documentation, ProbablyEasy

Created on 2009-12-23.09:39:00 by uzytkownik, last changed 2010-06-15.21:31:05 by admin.

msg9662 (view) Author: uzytkownik Date: 2009-12-23.09:38:58
Linking dist/build/darcs/darcs ...
Running Haddock for darcs-2.3.1...
Preprocessing library darcs-2.3.1...
Preprocessing executables for darcs-2.3.1...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: base-, ffi-1.0, rts-1.0

src/Darcs/Repository/Prefs.lhs:127:0:  error: unterminated comment
msg9663 (view) Author: kowey Date: 2009-12-23.11:23:20
Let's fill out the 4 corners of this square:

Cabal 1.6.x - darcs 2.3.1 - ok
Cabal 1.6.x - darcs HEAD  - ok
Cabal 1.8.x - darcs 2.3.1 - FAIL
Cabal 1.8.x - darcs HEAD  - unknown

Duncan mention that there are changes in Cabal 1.8:

<dcoutts> ok so the difference is that Cabal-1.8 pre-processes before passing it
to haddock
<dcoutts> Cabal-1.6 just gave it all to haddock
<dcoutts> and the fact is that gcc -E does claim it's an unterminated comment
<dcoutts> what is somewhat surprising is that it did not fail before using haddock
 since we did pass --optghc-XCPP
 so haddock should have been running cpp on every file
<ivanm> dcoutts: is it the fact that it's .lhs a possible factor?
<dcoutts> ivanm: oh, maybe so. I think ghc does unlit and cpp in the wrong order
<ivanm> *nod*
<dcoutts> so it would do unlit first then cpp
 which in this case would help
 ivanm: yes I think that's it
<dcoutts> kowey: so the fix is simple
<dcoutts> just don't use /* */ style comments

Looks like there is a clear fix for this... could we get a volunteer?
msg9735 (view) Author: twb Date: 2010-01-07.03:26:33
dcoutts> So the fix is simple: just don't use /* */ style comments.

kowey> Looks like there is a clear fix for this... could we get a
kowey> volunteer?

There aren't any C comments in .lhs files in HEAD:

    $ grep -r '/\*\|\*/' --exclude-dir darcs --include '*.lhs' .
    ./src/Darcs/Commands/Dist.lhs: "  project=${PWD##*/} &&\n" ++
    ./src/Darcs/Patch/Match.lhs:          , ["src/foo.c", "src/", "\"src/*.(c|h)\""]
    ./src/Darcs/Repository/Prefs.lhs:simple \verb-darcs add newdir newdir/*-
msg9736 (view) Author: twb Date: 2010-01-07.03:55:42
Trent W. Buck wrote:
> There aren't any C comments in .lhs files in HEAD:
>     $ grep -r '/\*\|\*/' --exclude-dir darcs --include '*.lhs' .
>     ./src/Darcs/Commands/Dist.lhs: "  project=${PWD##*/} &&\n" ++
>     ./src/Darcs/Patch/Match.lhs:          , ["src/foo.c", "src/", "\"src/*.(c|h)\""]
>     ./src/Darcs/Repository/Prefs.lhs:simple \verb-darcs add newdir newdir/*-

Never mind; I see from patches on darcs-users that the problem is that
these *look* like C comments, but aren't.
msg9738 (view) Author: tux_rocker Date: 2010-01-07.09:28:31
It would be very clumsy to have a 2.4 release that can't build documentation
with the latest Cabal.

Do we know what package is ultimately responsible for this failure? Is it GNU
cpp, cpphs or haskell-src-exts that breaks its brain here?
msg9741 (view) Author: fx Date: 2010-01-07.09:48:39
The following patch updated the status of issue1720 to be resolved:

* Resolve issue1720:  Fix cabal haddock problem. 
Ignore-this: 1521b3a742711ac3ee979efc765f6b61
Date User Action Args
2009-12-23 09:39:00uzytkownikcreate
2009-12-23 11:23:31koweysetpriority: bug
status: unknown -> needs-implementation
topic: + ProbablyEasy, Target-2.4, Documentation, Devel
messages: + msg9663
nosy: + twb, duncan, kowey, jaredj
2010-01-07 03:26:39twbsetmessages: + msg9735
2010-01-07 03:55:44twbsetmessages: + msg9736
2010-01-07 09:28:39tux_rockersetnosy: + tux_rocker
messages: + msg9738
2010-01-07 09:48:43fxsetstatus: needs-implementation -> resolved
nosy: + fx
messages: + msg9741
2010-06-15 21:31:04adminsetmilestone: 2.4.x
2010-06-15 21:31:05adminsettopic: - Target-2.4