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

Haddock generation error with GHC 7.6.3 #8

Open
snoyberg opened this issue Jul 8, 2014 · 9 comments
Open

Haddock generation error with GHC 7.6.3 #8

snoyberg opened this issue Jul 8, 2014 · 9 comments

Comments

@snoyberg
Copy link

snoyberg commented Jul 8, 2014

Unpacking to json-schema-0.6/
Resolving dependencies...
Configuring json-schema-0.6...
Building json-schema-0.6...
Preprocessing library json-schema-0.6...
[1 of 4] Compiling Data.JSON.Schema.Types ( src/Data/JSON/Schema/Types.hs, dist/build/Data/JSON/Schema/Types.o )
[2 of 4] Compiling Data.JSON.Schema.Combinators ( src/Data/JSON/Schema/Combinators.hs, dist/build/Data/JSON/Schema/Combinators.o )
[3 of 4] Compiling Data.JSON.Schema.Generic ( src/Data/JSON/Schema/Generic.hs, dist/build/Data/JSON/Schema/Generic.o )
[4 of 4] Compiling Data.JSON.Schema ( src/Data/JSON/Schema.hs, dist/build/Data/JSON/Schema.o )
In-place registering json-schema-0.6...
Preprocessing test suite 'json-schema-generic-aeson-tests' for
json-schema-0.6...
[1 of 1] Compiling Main             ( tests/Main.hs, dist/build/json-schema-generic-aeson-tests/json-schema-generic-aeson-tests-tmp/Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package text-1.1.1.3 ... linking ... done.
Loading package hashable-1.2.2.0 ... linking ... done.
Loading package scientific-0.3.2.1 ... linking ... done.
Loading package attoparsec-0.12.1.0 ... linking ... done.
Loading package dlist-0.7.1 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package syb-0.4.2 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package unordered-containers-0.2.4.0 ... linking ... done.
Loading package primitive-0.5.3.0 ... linking ... done.
Loading package vector-0.10.11.0 ... linking ... done.
Loading package aeson-0.7.0.6 ... linking ... done.
Loading package generic-deriving-1.6.3 ... linking ... done.
Loading package tagged-0.7.2 ... linking ... done.
Loading package generic-aeson-0.1.0.3 ... linking ... done.
Loading package json-schema-0.6 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-posix-0.95.2 ... linking ... done.
Loading package language-haskell-extract-0.2.4 ... linking ... done.
Loading package unix-2.6.0.1 ... linking ... done.
Loading package ansi-terminal-0.6.1.1 ... linking ... done.
Loading package stm-2.4.3 ... linking ... done.
Loading package async-2.0.1.5 ... linking ... done.
Loading package ansi-wl-pprint-0.6.7.1 ... linking ... done.
Loading package filepath-1.3.0.1 ... linking ... done.
Loading package directory-1.2.0.1 ... linking ... done.
Loading package process-1.1.0.2 ... linking ... done.
Loading package optparse-applicative-0.8.1 ... linking ... done.
Loading package parsec-3.1.5 ... linking ... done.
Loading package regex-tdfa-rc-1.1.8.3 ... linking ... done.
Loading package unbounded-delays-0.1.0.7 ... linking ... done.
Loading package tasty-0.8.1.3 ... linking ... done.
Loading package tasty-th-0.1.2 ... linking ... done.
Loading package HUnit-1.2.5.2 ... linking ... done.
Loading package tasty-hunit-0.8.0.1 ... linking ... done.
Linking dist/build/json-schema-generic-aeson-tests/json-schema-generic-aeson-tests ...
Building json-schema-0.6...
Preprocessing library json-schema-0.6...
In-place registering json-schema-0.6...
Preprocessing test suite 'json-schema-generic-aeson-tests' for
json-schema-0.6...
Running 1 test suites...
Test suite json-schema-generic-aeson-tests: RUNNING...
generic-aeson
  Main
    constructorWithoutFields:                                 OK
    record:                                                   OK
    recordWithFields:                                         OK
    constructorOneField:                                      OK
    constructorWithFields:                                    OK
    sumConstructorsWithField:                                 OK
    sumRecord:                                                OK
    sumRecordConstructorWithoutFields:                        OK
    sumConstructorWithoutFieldsConstructorWithFields:         OK
    sumConstructorWithoutFieldsConstructorWithRecursiveField: OK
    sum constructorWithoutFields record:                      OK
    recordListField:                                          OK
    constructorListField:                                     OK
    ConstructorSameTypedFields:                               OK
    RecordMaybeField:                                         OK
    constructorsWithoutFields:                                OK
    recordWithUnderscoredFields:                              OK

All 17 tests passed
Test suite json-schema-generic-aeson-tests: PASS
Test suite logged to:
dist/test/json-schema-0.6-json-schema-generic-aeson-tests.log
1 of 1 test suites (1 of 1 test cases) passed.
Running Haddock for json-schema-0.6...
Preprocessing library json-schema-0.6...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: aeson-0.7.0.6, attoparsec-0.12.1.0,
dlist-0.7.1, generic-aeson-0.1.0.3, generic-deriving-1.6.3, hashable-1.2.2.0,
mtl-2.1.3.1, primitive-0.5.3.0, scientific-0.3.2.1, syb-0.4.2, tagged-0.7.2,
text-1.1.1.3, transformers-0.3.0.0, unordered-containers-0.2.4.0,
vector-0.10.11.0
Haddock coverage:
  75% (  6 /  8) in 'Data.JSON.Schema.Types'
  87% ( 13 / 15) in 'Data.JSON.Schema.Combinators'
 100% (  2 /  2) in 'Data.JSON.Schema.Generic'
Warning: Couldn't find .haddock for export Data.Proxy.Proxy
  50% (  2 /  4) in 'Data.JSON.Schema'
Warning: Data.JSON.Schema.Types: could not find link destinations for:
    Data.Text.Internal.Text Data.Text.Internal.Lazy.Text Data.Vector.Vector Data.HashMap.Base.HashMap Data.Aeson.Types.Internal.Value
Warning: Data.JSON.Schema.Combinators: could not find link destinations for:
    Data.Text.Internal.Text Data.Aeson.Types.Internal.Value
Warning: Data.JSON.Schema.Generic: could not find link destinations for:
    Data.JSON.Schema.Generic.GJSONSCHEMA Generics.Deriving.ConNames.ConNames Generics.Generic.IsEnum.GIsEnum
haddock: internal error: synifyKind
@hesselink
Copy link
Member

This is because of a haddock bug. Supposedly it has been fixed, but I don't think haddock can be updated separately from ghc. It seems to be fixed when using ghc 7.8 here, I'm guessing you're using 7.6?

@snoyberg
Copy link
Author

snoyberg commented Jul 8, 2014

Stackage builds with both 7.6 and 7.8. This report came from a 7.6 build.

@hesselink
Copy link
Member

OK, well, I see no way to fix this on 7.6. The only thing I could do locally is remove the export of Data.Proxy.Proxy, but that would break all packages using it.

@snoyberg
Copy link
Author

snoyberg commented Jul 8, 2014

What about using CPP to hide that code from Haddock?

@hesselink
Copy link
Member

How do we detect if we're being compiled from haddock in CPP?

@snoyberg
Copy link
Author

snoyberg commented Jul 8, 2014

You can use #ifdef __HADDOCK__ I believe.

@hesselink
Copy link
Member

I can't get this to work. Could you point me to the documentation?

@snoyberg
Copy link
Author

snoyberg commented Jul 8, 2014

Looks like this was broken a while ago: haskell/cabal#1237.

I'll just disable the test phase for json-schema for Stackage with GHC 7.6.3.

snoyberg added a commit to commercialhaskell/stackage that referenced this issue Jul 8, 2014
@hesselink
Copy link
Member

Thanks. I've also tried __HADDOCK_VERSION__ which should be the modern equivalent according to haskell/cabal#1238, but I doesn't seem to be defined (ghc 7.6 or 7.8, cabal-install 1.20.0.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants