Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synopsis split across a line causing haddock failures #1018

Closed
juhp opened this issue Dec 3, 2015 · 12 comments
Closed

synopsis split across a line causing haddock failures #1018

juhp opened this issue Dec 3, 2015 · 12 comments

Comments

@juhp
Copy link
Contributor

juhp commented Dec 3, 2015

Another weird haddock failure in the Stackage Nightly build (which I could not reproduce locally:

Preprocessing library stm-conduit-2.6.1...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: nats-1.1,
transformers-compat-0.4.0.4
target ‘conduits concurrently.’ is not a module name or a source file

‘conduits concurrently.’ comes from the Synopsis!

juhp added a commit that referenced this issue Dec 3, 2015
`target ‘conduits concurrently.’ is not a module name or a source file` ??

where that string comes from the Synopsis
@juhp juhp changed the title stm-conduit-2.6.1haddock failure stm-conduit-2.6.1 haddock failure Dec 7, 2015
@juhp juhp changed the title stm-conduit-2.6.1 haddock failure stm-conduit-2.6.1 haddock failure "target ‘conduits concurrently.’ is not a module" Dec 10, 2015
@snoyberg
Copy link
Contributor

This also affects:

  • aeson-casing
  • groom

See #1030

@bergmark
Copy link
Member

Also tasty-rerun when building LTS

Running Haddock for tasty-rerun-1.1.5...
Preprocessing library tasty-rerun-1.1.5...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: nats-1, transformers-compat-0.4.0.4
target ‘runs’ is not a module name or a source file

@snoyberg
Copy link
Contributor

A number of these Haddocks seem to have started building again, I'll remove the relevant expected failures.

@juhp
Copy link
Contributor Author

juhp commented Dec 21, 2015

So maybe we can close this now?

@snoyberg
Copy link
Contributor

I'd say this still requires more research to figure out what's going on. I've looked into it a few times, and have a theory that somewhere along the way whitespace in the cabal file is getting corrupted somehow, but I have no idea exactly how that's happening or why it seems to fix itself after some time. I'll try to set aside a block of time to work on it today.

@juhp juhp changed the title stm-conduit-2.6.1 haddock failure "target ‘conduits concurrently.’ is not a module" haddock failures: "target ‘<synopsis strings>’ is not a module" Dec 28, 2015
@juhp juhp changed the title haddock failures: "target ‘<synopsis strings>’ is not a module" haddock failures: "target ‘<synopsis strings>’ is not a module or a source file" Dec 28, 2015
@juhp
Copy link
Contributor Author

juhp commented Dec 28, 2015

For LTS-3.20 build this happens for:

  • blaze-builder-enumerator-0.2.1.0
  • ghc-mtl-1.2.1.0
  • bson-0.3.2.1
  • hedis-0.6.9
  • ref-fd-0.4

juhp added a commit to juhp/lts-haskell that referenced this issue Dec 28, 2015
blaze-builder-enumerator-0.2.1.0
ghc-mtl-1.2.1.0
bson-0.3.2.1
hedis-0.6.9
ref-fd-0.4
snoyberg added a commit to commercialhaskell/lts-haskell that referenced this issue Dec 28, 2015
@juhp
Copy link
Contributor Author

juhp commented Dec 28, 2015

Actually I think mongoDB too.

I suspect the packages in question all have their synopsis split over a line
(I guess people do that because they can...).

@juhp juhp changed the title haddock failures: "target ‘<synopsis strings>’ is not a module or a source file" synopsis split across a line causing haddock failures Dec 28, 2015
snoyberg added a commit to commercialhaskell/lts-haskell that referenced this issue Dec 28, 2015
mongoDB haddock also fails with split synopsis (commercialhaskell/stackage#1018)
@snoyberg
Copy link
Contributor

I've been able to reproduce this from within the Docker image by just running cabal commands. I'm seeing if I can reproduce this with a matching Cabal/cabal-install version combo on my local system.

@snoyberg
Copy link
Contributor

I discovered the problem, and it appears to be a bug in response file handling. Specifically, it appears that Cabal is not properly escaping the arguments added to the response file. Consider the following response file:

--prologue=dist/doc/html/tmp/haddock-prologue1804289383846930886.txt
--dump-interface=dist/doc/html/tmp/tmp.haddock
--package-name=tmp
--package-version=0.1.0.0
--verbosity=1
--html
--read-interface=file:///opt/ghc/7.10.2/share/doc/ghc/html/libraries/base-4.8.1.0,/opt/ghc/7.10.2/share/doc/ghc/html/libraries/base-4.8.1.0/base.haddock
--read-interface=file:///opt/ghc/7.10.2/share/doc/ghc/html/libraries/ghc-prim-0.4.0.0,/opt/ghc/7.10.2/share/doc/ghc/html/libraries/ghc-prim-0.4.0.0/ghc-prim.haddock
--read-interface=file:///opt/ghc/7.10.2/share/doc/ghc/html/libraries/integer-gmp-1.0.0.0,/opt/ghc/7.10.2/share/doc/ghc/html/libraries/integer-gmp-1.0.0.0/integer-gmp.haddock
--odir=dist/doc/html/tmp/
--title=tmp-0.1.0.0: this is the
package synopsis
--optghc=-fbuilding-cabal-package
--optghc=-O
--optghc=-outputdir
--optghc=dist/build
--optghc=-odir
--optghc=dist/build/tmp-10310
--optghc=-hidir
--optghc=dist/build/tmp-10310
--optghc=-stubdir
--optghc=dist/build/tmp-10310
--optghc=-i
--optghc=-idist/build
--optghc=-i.
--optghc=-idist/build/autogen
--optghc=-Idist/build/autogen
--optghc=-Idist/build
--optghc=-optP-D__HADDOCK_VERSION__=2162
--optghc=-optP-include
--optghc=-optPdist/build/autogen/cabal_macros.h
--optghc=-this-package-key
--optghc=tmp_JdaAODhQa7p5WhxMngbYYt
--optghc=-hide-all-packages
--optghc=-package-id
--optghc=base-4.8.1.0-4f7206fd964c629946bb89db72c80011
--optghc=-XHaskell2010
-B/opt/ghc/7.10.2/lib/ghc-7.10.2
Foo.hs

I'll open up an upstream bug report.

@snoyberg
Copy link
Contributor

Note that the reason I did not reproduce this on my system is that this will only occur with haddock > 2.16.1, which we have in our Docker image, but not on my home system.

@juhp
Copy link
Contributor Author

juhp commented Jan 6, 2016

Thanks, maybe we can close this now then?
(Or should we keep this open to track the upstream issues?)

@snoyberg
Copy link
Contributor

snoyberg commented Jan 6, 2016

No, good catch, we can close this.

@snoyberg snoyberg closed this as completed Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants