biocad / servant-openapi3

OpenAPI 3.0 for Servant
BSD 3-Clause "New" or "Revised" License
38 stars 23 forks source link

Bizarre doctest failures #30

Open sternenseemann opened 2 years ago

sternenseemann commented 2 years ago

Running into this on our build infrastructure, seems like there is a minor problem with the patterns that I can not quite discern, using GHC 9.0.2 and doctest-0.18.2.

setupCompilerEnvironmentPhase
Build with /nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2.
unpacking sources
unpacking source archive /nix/store/b0mb08cf2ncjv20ij7wpqwl2sql2pndf-servant-openapi3-2.0.1.5.tar.gz
source root is servant-openapi3-2.0.1.5
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file servant-openapi3-2.0.1.5/test/Spec.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/tmp.84Llg8383c/setup-package.conf.d -j2 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/tmp.84Llg8383c/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/804x9zz2wxqbqv4yq8m53073yx4az3m7-servant-openapi3-2.0.1.5-doc/share/doc/servant-openapi3-2.0.1.5 --with-gcc=gcc --package-db=/build/tmp.84Llg8383c/package.conf.d --ghc-options=-j2 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --ghc-options=-haddock --extra-lib-dirs=/nix/store/1pl0x17adk2r9rx99rlfny9r0alha5m8-ncurses-6.3/lib --extra-lib-dirs=/nix/store/7m5ik9rhh55m021kzmg4hb4zjfj3lyyc-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/4l48ybgm682wr7s2m1bzr85ca51i3kgb-gmp-with-cxx-6.2.1/lib --extra-lib-dirs=/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/lib
Using Parsec parser
Configuring servant-openapi3-2.0.1.5...
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && <2.1: using aeson-2.0.3.0
Dependency aeson-pretty >=0.8.7 && <0.9: using aeson-pretty-0.8.9
Dependency base >=4.9.1.0 && <4.17: using base-4.15.1.0
Dependency base-compat >=0.10.5 && <0.13: using base-compat-0.11.2
Dependency bytestring >=0.10.8.1 && <0.12: using bytestring-0.10.12.1
Dependency hspec: using hspec-2.8.5
Dependency http-media >=0.7.1.3 && <0.9: using http-media-0.8.0.0
Dependency insert-ordered-containers >=0.2.1.0 && <0.3: using
insert-ordered-containers-0.2.5.1
Dependency lens >=4.17 && <5.2: using lens-5.0.1
Dependency openapi3 >=3.0.0 && <3.3: using openapi3-3.2.2
Dependency servant >=0.17 && <0.20: using servant-0.19
Dependency singleton-bool >=0.1.4 && <0.2: using singleton-bool-0.1.6
Dependency text >=1.2.3.0 && <3: using text-1.2.5.0
Dependency unordered-containers >=0.2.9.0 && <0.3: using
unordered-containers-0.2.17.0
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency base: using base-4.15.1.0
Dependency directory >=1.0: using directory-1.3.6.2
Dependency doctest >=0.11.1 && <0.21: using doctest-0.18.2
Dependency filepath: using filepath-1.4.2.1
Dependency servant: using servant-0.19
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency aeson: using aeson-2.0.3.0
Dependency base: using base-4.15.1.0
Dependency base-compat: using base-compat-0.11.2
Dependency hspec >=2.6.0 && <2.11: using hspec-2.8.5
Dependency lens: using lens-5.0.1
Dependency lens-aeson >=1.0.2 && <1.3: using lens-aeson-1.1.3
Dependency openapi3 >=3.1.0: using openapi3-3.2.2
Dependency servant: using servant-0.19
Dependency servant-openapi3: using servant-openapi3-2.0.1.5
Dependency template-haskell: using template-haskell-2.17.0.0
Dependency text: using text-1.2.5.0
Dependency time: using time-1.9.3
Dependency utf8-string >=1.0.1.1 && <1.1: using utf8-string-1.0.2
Dependency vector: using vector-0.12.3.1
Source component graph:
    component test:doctests
    component lib
    component test:spec dependency lib
Configured component graph:
    component servant-openapi3-2.0.1.5-9vQn3EmeGU5C4Wups5wmKO-doctests
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include base-4.15.1.0
        include directory-1.3.6.2
        include doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        include filepath-1.4.2.1
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    component servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include bytestring-0.10.12.1
        include hspec-2.8.5-15yd26Khcrc433s3iLylfP
        include http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        include insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        include text-1.2.5.0
        include unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
    component servant-openapi3-2.0.1.5-4Yuyp6k6amnBUg8x5eiKq1-spec
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include hspec-2.8.5-15yd26Khcrc433s3iLylfP
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        include template-haskell-2.17.0.0
        include text-1.2.5.0
        include time-1.9.3
        include utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        include vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Linked component graph:
    unit servant-openapi3-2.0.1.5-9vQn3EmeGU5C4Wups5wmKO-doctests
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include base-4.15.1.0
        include directory-1.3.6.2
        include doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        include filepath-1.4.2.1
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    unit servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include bytestring-0.10.12.1
        include hspec-2.8.5-15yd26Khcrc433s3iLylfP
        include http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        include insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        include text-1.2.5.0
        include unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
        Servant.OpenApi=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi,Servant.OpenApi.Internal=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal,Servant.OpenApi.Internal.Orphans=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.Orphans,Servant.OpenApi.Internal.Test=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.Test,Servant.OpenApi.Internal.TypeLevel=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.TypeLevel,Servant.OpenApi.Internal.TypeLevel.API=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.TypeLevel.API,Servant.OpenApi.Internal.TypeLevel.Every=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.TypeLevel.Every,Servant.OpenApi.Internal.TypeLevel.TMap=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Internal.TypeLevel.TMap,Servant.OpenApi.Test=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.Test,Servant.OpenApi.TypeLevel=servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8:Servant.OpenApi.TypeLevel
    unit servant-openapi3-2.0.1.5-4Yuyp6k6amnBUg8x5eiKq1-spec
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include hspec-2.8.5-15yd26Khcrc433s3iLylfP
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        include template-haskell-2.17.0.0
        include text-1.2.5.0
        include time-1.9.3
        include utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        include vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Ready component graph:
    definite servant-openapi3-2.0.1.5-9vQn3EmeGU5C4Wups5wmKO-doctests
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends base-4.15.1.0
        depends directory-1.3.6.2
        depends doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        depends filepath-1.4.2.1
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    definite servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        depends aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        depends base-4.15.1.0
        depends base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        depends bytestring-0.10.12.1
        depends hspec-2.8.5-15yd26Khcrc433s3iLylfP
        depends http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        depends insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        depends lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        depends openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        depends singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        depends text-1.2.5.0
        depends unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
    definite servant-openapi3-2.0.1.5-4Yuyp6k6amnBUg8x5eiKq1-spec
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        depends base-4.15.1.0
        depends base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        depends hspec-2.8.5-15yd26Khcrc433s3iLylfP
        depends lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        depends lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        depends openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        depends servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
        depends template-haskell-2.17.0.0
        depends text-1.2.5.0
        depends time-1.9.3
        depends utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        depends vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Using Cabal-3.4.1.0 compiled by ghc-9.0
Using compiler: ghc-9.0.2
Using install prefix:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5
Executables installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/bin
Libraries installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/lib/ghc-9.0.2/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5-1nKuqrqj9RYCI6r8hPXpo8
Dynamic Libraries installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/lib/ghc-9.0.2/x86_64-linux-ghc-9.0.2
Private executables installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/libexec/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5
Data files installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/share/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5
Documentation installed in:
/nix/store/804x9zz2wxqbqv4yq8m53073yx4az3m7-servant-openapi3-2.0.1.5-doc/share/doc/servant-openapi3-2.0.1.5
Configuration files installed in:
/nix/store/50laqw13j9bypzy2clzwa8i837pm2ny9-servant-openapi3-2.0.1.5/etc
No alex found
Using ar found on system at:
/nix/store/2b99rpx8zwdjjqkrvk7kqgn9mxhiidjy-binutils-2.38/bin/ar
No c2hs found
No cpphs found
Using doctest version 0.18.2 found on system at:
/nix/store/dbrl7byh5asi89v38z9q23dnv2wzq8b5-doctest-0.18.2/bin/doctest
Using gcc version 11.3.0 given by user at:
/nix/store/r7r10qvsqlnvbzjkjinvscjlahqbxifl-gcc-wrapper-11.3.0/bin/gcc
Using ghc version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/ghc
Using ghc-pkg version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.25.1 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/hpc
Using hsc2hs version 0.68.7 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/d194pcq8qz53qw0qb4v349c5w39f3nl5-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/10h6ymfb28wx6x8amj82h2sgw3ixrsb2-binutils-wrapper-2.38/bin/ld.gold
No pkg-config found
Using runghc version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/runghc
Using strip version 2.38 found on system at:
/nix/store/r7r10qvsqlnvbzjkjinvscjlahqbxifl-gcc-wrapper-11.3.0/bin/strip
Using tar found on system at:
/nix/store/5p3qyadsv163m7zvqssiw80zh6xfv2jv-gnutar-1.34/bin/tar
No uhc found
building
Preprocessing test suite 'doctests' for servant-openapi3-2.0.1.5..
Building test suite 'doctests' for servant-openapi3-2.0.1.5..
[1 of 2] Compiling Build_doctests   ( dist/build/doctests/autogen/Build_doctests.hs, dist/build/doctests/doctests-tmp/Build_doctests.o )
[2 of 2] Compiling Main             ( test/doctests.hs, dist/build/doctests/doctests-tmp/Main.o )
Linking dist/build/doctests/doctests ...
Preprocessing library for servant-openapi3-2.0.1.5..
Building library for servant-openapi3-2.0.1.5..
[ 1 of 10] Compiling Servant.OpenApi.Internal.Orphans ( src/Servant/OpenApi/Internal/Orphans.hs, dist/build/Servant/OpenApi/Internal/Orphans.o, dist/build/Servant/OpenApi/Internal/Orphans.dyn_o )

src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’
   |
16 | instance (Typeable (SourceT m a), ToSchema a) => ToSchema (SourceT m a) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.API ( src/Servant/OpenApi/Internal/TypeLevel/API.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/API.o, dist/build/Servant/OpenApi/Internal/TypeLevel/API.dyn_o )

src/Servant/OpenApi/Internal/TypeLevel/API.hs:88:34: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
88 | type family BodyTypes' c api :: [*] where
   |                                  ^
[ 3 of 10] Compiling Servant.OpenApi.Internal ( src/Servant/OpenApi/Internal.hs, dist/build/Servant/OpenApi/Internal.o, dist/build/Servant/OpenApi/Internal.dyn_o )

src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
    |
241 | instance (Typeable (WithStatus s a), ToSchema a) => ToSchema (WithStatus s a) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.TMap ( src/Servant/OpenApi/Internal/TypeLevel/TMap.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.o, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.dyn_o )
[ 5 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.Every ( src/Servant/OpenApi/Internal/TypeLevel/Every.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.o, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.dyn_o )

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:37: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                     ^

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:61: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                                             ^
[ 6 of 10] Compiling Servant.OpenApi.Internal.TypeLevel ( src/Servant/OpenApi/Internal/TypeLevel.hs, dist/build/Servant/OpenApi/Internal/TypeLevel.o, dist/build/Servant/OpenApi/Internal/TypeLevel.dyn_o )
[ 7 of 10] Compiling Servant.OpenApi.Internal.Test ( src/Servant/OpenApi/Internal/Test.hs, dist/build/Servant/OpenApi/Internal/Test.o, dist/build/Servant/OpenApi/Internal/Test.dyn_o )
[ 8 of 10] Compiling Servant.OpenApi.Test ( src/Servant/OpenApi/Test.hs, dist/build/Servant/OpenApi/Test.o, dist/build/Servant/OpenApi/Test.dyn_o )
[ 9 of 10] Compiling Servant.OpenApi  ( src/Servant/OpenApi.hs, dist/build/Servant/OpenApi.o, dist/build/Servant/OpenApi.dyn_o )
[10 of 10] Compiling Servant.OpenApi.TypeLevel ( src/Servant/OpenApi/TypeLevel.hs, dist/build/Servant/OpenApi/TypeLevel.o, dist/build/Servant/OpenApi/TypeLevel.dyn_o )
[ 1 of 10] Compiling Servant.OpenApi.Internal.Orphans ( src/Servant/OpenApi/Internal/Orphans.hs, dist/build/Servant/OpenApi/Internal/Orphans.p_o )

src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’
   |
16 | instance (Typeable (SourceT m a), ToSchema a) => ToSchema (SourceT m a) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.API ( src/Servant/OpenApi/Internal/TypeLevel/API.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/API.p_o )

src/Servant/OpenApi/Internal/TypeLevel/API.hs:88:34: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
88 | type family BodyTypes' c api :: [*] where
   |                                  ^
[ 3 of 10] Compiling Servant.OpenApi.Internal ( src/Servant/OpenApi/Internal.hs, dist/build/Servant/OpenApi/Internal.p_o )

src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
    |
241 | instance (Typeable (WithStatus s a), ToSchema a) => ToSchema (WithStatus s a) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.TMap ( src/Servant/OpenApi/Internal/TypeLevel/TMap.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.p_o )
[ 5 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.Every ( src/Servant/OpenApi/Internal/TypeLevel/Every.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.p_o )

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:37: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                     ^

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:61: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                                             ^
[ 6 of 10] Compiling Servant.OpenApi.Internal.TypeLevel ( src/Servant/OpenApi/Internal/TypeLevel.hs, dist/build/Servant/OpenApi/Internal/TypeLevel.p_o )
[ 7 of 10] Compiling Servant.OpenApi.Internal.Test ( src/Servant/OpenApi/Internal/Test.hs, dist/build/Servant/OpenApi/Internal/Test.p_o )
[ 8 of 10] Compiling Servant.OpenApi.Test ( src/Servant/OpenApi/Test.hs, dist/build/Servant/OpenApi/Test.p_o )
[ 9 of 10] Compiling Servant.OpenApi  ( src/Servant/OpenApi.hs, dist/build/Servant/OpenApi.p_o )
[10 of 10] Compiling Servant.OpenApi.TypeLevel ( src/Servant/OpenApi/TypeLevel.hs, dist/build/Servant/OpenApi/TypeLevel.p_o )
Preprocessing test suite 'spec' for servant-openapi3-2.0.1.5..
Building test suite 'spec' for servant-openapi3-2.0.1.5..
[1 of 2] Compiling Servant.OpenApiSpec ( test/Servant/OpenApiSpec.hs, dist/build/spec/spec-tmp/Servant/OpenApiSpec.o, dist/build/spec/spec-tmp/Servant/OpenApiSpec.dyn_o )
[2 of 2] Compiling Main             ( test/Spec.hs, dist/build/spec/spec-tmp/Main.o, dist/build/spec/spec-tmp/Main.dyn_o )
Linking dist/build/spec/spec ...
running tests
Running 2 test suites...
Test suite doctests: RUNNING...

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi.hs:506: failure in expression `hspec $ validateEveryToJSON (Proxy :: Proxy UserAPI)'
expected: 
          [User]...
          ...
          User...
          ...
          UserId...
          ...
          Finished in ... seconds
          ...3 examples, 0 failures...
 but got: 
          [User]
            +++ OK, passed 100 tests.
          User
            +++ OK, passed 100 tests.
          UserId
            +++ OK, passed 100 tests.

          Finished in 0.0222 seconds
          3 examples, 0 failures
           ^

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Test.hs:51: failure in expression `hspec $ context "ToJSON matches ToSchema" $ validateEveryToJSON (Proxy :: Proxy UserAPI)'
expected: 
          ToJSON matches ToSchema
            User...
          ...
            UserId...
          ...
          Finished in ... seconds
          ...2 examples, 0 failures...
 but got: 
          ToJSON matches ToSchema
            User
              +++ OK, passed 100 tests.
            UserId
              +++ OK, passed 100 tests.
            ^

          Finished in 0.0023 seconds
          2 examples, 0 failures

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Test.hs:108: failure in expression `:{
  hspec $
    context "read . show == id" $
      props
        (Proxy :: Proxy [Eq, Show, Read])
        (\x -> read (show x) === x)
        (Proxy :: Proxy [Bool, Int, String])
:}'
expected: 
          read . show == id
            Bool...
          ...
            Int...
          ...
            [Char]...
          ...
          Finished in ... seconds
          ...3 examples, 0 failures...
 but got: 
          read . show == id
            Bool
              +++ OK, passed 100 tests.
            Int
              +++ OK, passed 100 tests.
            [Char]
              +++ OK, passed 100 tests.
            ^

          Finished in 0.0150 seconds
          3 examples, 0 failures

Examples: 90  Tried: 85  Errors: 0  Failures: 3
-i
-i/build/servant-openapi3-2.0.1.5/dist/build/autogen
-i/build/servant-openapi3-2.0.1.5/dist/build
-i/build/servant-openapi3-2.0.1.5/src
-package-env=-
-hide-all-packages
-no-user-package-db
-package-db=/build/tmp.84Llg8383c/package.conf.d
-package-db=dist/package.conf.inplace
-optP-include
-optPdist/build/autogen/cabal_macros.h
-package-id=QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
-package-id=aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
-package-id=aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
-package-id=base-4.15.1.0
-package-id=base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
-package-id=bytestring-0.10.12.1
-package-id=hspec-2.8.5-15yd26Khcrc433s3iLylfP
-package-id=http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
-package-id=insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
-package-id=lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
-package-id=openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
-package-id=servant-0.19-GGif3G3NYIoEj4gSR8L6J7
-package-id=singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
-package-id=text-1.2.5.0
-package-id=unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
-package-id=directory-1.3.6.2
-package-id=doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
-package-id=filepath-1.4.2.1
Servant.OpenApi
Servant.OpenApi.Test
Servant.OpenApi.TypeLevel
Servant.OpenApi.Internal
Servant.OpenApi.Internal.Orphans
Servant.OpenApi.Internal.Test
Servant.OpenApi.Internal.TypeLevel
Servant.OpenApi.Internal.TypeLevel.API
Servant.OpenApi.Internal.TypeLevel.Every
Servant.OpenApi.Internal.TypeLevel.TMap
Test suite doctests: FAIL
Test suite logged to: dist/test/servant-openapi3-2.0.1.5-doctests.log
Test suite spec: RUNNING...

Servant.OpenApi
  HasOpenApi
    Todo API
    Hackage API (with tags)
    GetPost API (test subOperations)
    Comprehensive API
    UVerb API

Finished in 0.0020 seconds
5 examples, 0 failures
Test suite spec: PASS
Test suite logged to: dist/test/servant-openapi3-2.0.1.5-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
maksbotan commented 2 years ago

Hi! Can you please try running those tests with hspec 2.10?

sternenseemann commented 2 years ago

Still happens with hspec 2.10:

compileBuildDriverPhase
setupCompileFlags: -package-db=/build/tmp.m40j6lP8RJ/setup-package.conf.d -j4 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/tmp.m40j6lP8RJ/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/hm2m80z9k5l0ipb2yd2w0zfmvwdjhi3q-servant-openapi3-2.0.1.5-doc/share/doc/servant-openapi3-2.0.1.5 --with-gcc=gcc --package-db=/build/tmp.m40j6lP8RJ/package.conf.d --ghc-options=-j4 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --ghc-options=-haddock --extra-lib-dirs=/nix/store/1pl0x17adk2r9rx99rlfny9r0alha5m8-ncurses-6.3/lib --extra-lib-dirs=/nix/store/7m5ik9rhh55m021kzmg4hb4zjfj3lyyc-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/4l48ybgm682wr7s2m1bzr85ca51i3kgb-gmp-with-cxx-6.2.1/lib --extra-lib-dirs=/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/lib
Using Parsec parser
Configuring servant-openapi3-2.0.1.5...
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && <2.1: using aeson-2.0.3.0
Dependency aeson-pretty >=0.8.7 && <0.9: using aeson-pretty-0.8.9
Dependency base >=4.9.1.0 && <4.17: using base-4.15.1.0
Dependency base-compat >=0.10.5 && <0.13: using base-compat-0.11.2
Dependency bytestring >=0.10.8.1 && <0.12: using bytestring-0.10.12.1
Dependency hspec: using hspec-2.10.0
Dependency http-media >=0.7.1.3 && <0.9: using http-media-0.8.0.0
Dependency insert-ordered-containers >=0.2.1.0 && <0.3: using
insert-ordered-containers-0.2.5.1
Dependency lens >=4.17 && <5.2: using lens-5.0.1
Dependency openapi3 >=3.0.0 && <3.3: using openapi3-3.2.2
Dependency servant >=0.17 && <0.20: using servant-0.19
Dependency singleton-bool >=0.1.4 && <0.2: using singleton-bool-0.1.6
Dependency text >=1.2.3.0 && <3: using text-1.2.5.0
Dependency unordered-containers >=0.2.9.0 && <0.3: using
unordered-containers-0.2.17.0
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency base: using base-4.15.1.0
Dependency directory >=1.0: using directory-1.3.6.2
Dependency doctest >=0.11.1 && <0.21: using doctest-0.18.2
Dependency filepath: using filepath-1.4.2.1
Dependency servant: using servant-0.19
Dependency QuickCheck: using QuickCheck-2.14.2
Dependency aeson: using aeson-2.0.3.0
Dependency base: using base-4.15.1.0
Dependency base-compat: using base-compat-0.11.2
Dependency hspec >=2.6.0 && <2.11: using hspec-2.10.0
Dependency lens: using lens-5.0.1
Dependency lens-aeson >=1.0.2 && <1.3: using lens-aeson-1.1.3
Dependency openapi3 >=3.1.0: using openapi3-3.2.2
Dependency servant: using servant-0.19
Dependency servant-openapi3: using servant-openapi3-2.0.1.5
Dependency template-haskell: using template-haskell-2.17.0.0
Dependency text: using text-1.2.5.0
Dependency time: using time-1.9.3
Dependency utf8-string >=1.0.1.1 && <1.1: using utf8-string-1.0.2
Dependency vector: using vector-0.12.3.1
Source component graph:
    component test:doctests
    component lib
    component test:spec dependency lib
Configured component graph:
    component servant-openapi3-2.0.1.5-9f2hUSoCpnCFZK8WvRe0wR-doctests
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include base-4.15.1.0
        include directory-1.3.6.2
        include doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        include filepath-1.4.2.1
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    component servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include bytestring-0.10.12.1
        include hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        include http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        include insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        include text-1.2.5.0
        include unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
    component servant-openapi3-2.0.1.5-8P7xeA1FLjc2fIQFaDkBhA-spec
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        include template-haskell-2.17.0.0
        include text-1.2.5.0
        include time-1.9.3
        include utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        include vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Linked component graph:
    unit servant-openapi3-2.0.1.5-9f2hUSoCpnCFZK8WvRe0wR-doctests
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include base-4.15.1.0
        include directory-1.3.6.2
        include doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        include filepath-1.4.2.1
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    unit servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include bytestring-0.10.12.1
        include hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        include http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        include insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        include text-1.2.5.0
        include unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
        Servant.OpenApi=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi,Servant.OpenApi.Internal=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal,Servant.OpenApi.Internal.Orphans=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.Orphans,Servant.OpenApi.Internal.Test=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.Test,Servant.OpenApi.Internal.TypeLevel=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.TypeLevel,Servant.OpenApi.Internal.TypeLevel.API=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.TypeLevel.API,Servant.OpenApi.Internal.TypeLevel.Every=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.TypeLevel.Every,Servant.OpenApi.Internal.TypeLevel.TMap=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Internal.TypeLevel.TMap,Servant.OpenApi.Test=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.Test,Servant.OpenApi.TypeLevel=servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka:Servant.OpenApi.TypeLevel
    unit servant-openapi3-2.0.1.5-8P7xeA1FLjc2fIQFaDkBhA-spec
        include QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        include aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        include base-4.15.1.0
        include base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        include hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        include lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        include lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        include openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        include servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        include servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        include template-haskell-2.17.0.0
        include text-1.2.5.0
        include time-1.9.3
        include utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        include vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Ready component graph:
    definite servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        depends aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
        depends base-4.15.1.0
        depends base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        depends bytestring-0.10.12.1
        depends hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        depends http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
        depends insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
        depends lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        depends openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        depends singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
        depends text-1.2.5.0
        depends unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
    definite servant-openapi3-2.0.1.5-9f2hUSoCpnCFZK8WvRe0wR-doctests
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends base-4.15.1.0
        depends directory-1.3.6.2
        depends doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
        depends filepath-1.4.2.1
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
    definite servant-openapi3-2.0.1.5-8P7xeA1FLjc2fIQFaDkBhA-spec
        depends QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
        depends aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
        depends base-4.15.1.0
        depends base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
        depends hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
        depends lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
        depends lens-aeson-1.1.3-3FsDeWZaP30IAUE3WNL7m5
        depends openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
        depends servant-0.19-GGif3G3NYIoEj4gSR8L6J7
        depends servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
        depends template-haskell-2.17.0.0
        depends text-1.2.5.0
        depends time-1.9.3
        depends utf8-string-1.0.2-Lm887ungamcD8QgwYloUIG
        depends vector-0.12.3.1-TXkE6leK98EdYcmdk29JF
Using Cabal-3.4.1.0 compiled by ghc-9.0
Using compiler: ghc-9.0.2
Using install prefix:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5
Executables installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/bin
Libraries installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/lib/ghc-9.0.2/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5-JpQkrU8Duml5J2oQFHpcka
Dynamic Libraries installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/lib/ghc-9.0.2/x86_64-linux-ghc-9.0.2
Private executables installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/libexec/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5
Data files installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/share/x86_64-linux-ghc-9.0.2/servant-openapi3-2.0.1.5
Documentation installed in:
/nix/store/hm2m80z9k5l0ipb2yd2w0zfmvwdjhi3q-servant-openapi3-2.0.1.5-doc/share/doc/servant-openapi3-2.0.1.5
Configuration files installed in:
/nix/store/ps21hla4l72fpn5mjhgm7fi6l1qx6x2a-servant-openapi3-2.0.1.5/etc
No alex found
Using ar found on system at:
/nix/store/2b99rpx8zwdjjqkrvk7kqgn9mxhiidjy-binutils-2.38/bin/ar
No c2hs found
No cpphs found
Using doctest version 0.18.2 found on system at:
/nix/store/dbrl7byh5asi89v38z9q23dnv2wzq8b5-doctest-0.18.2/bin/doctest
Using gcc version 11.3.0 given by user at:
/nix/store/r7r10qvsqlnvbzjkjinvscjlahqbxifl-gcc-wrapper-11.3.0/bin/gcc
Using ghc version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/ghc
Using ghc-pkg version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.25.1 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/hpc
Using hsc2hs version 0.68.7 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/d194pcq8qz53qw0qb4v349c5w39f3nl5-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/10h6ymfb28wx6x8amj82h2sgw3ixrsb2-binutils-wrapper-2.38/bin/ld.gold
No pkg-config found
Using runghc version 9.0.2 found on system at:
/nix/store/0hy2ydriiyh7azw57agy8ajr3gxbw7i2-ghc-9.0.2/bin/runghc
Using strip version 2.38 found on system at:
/nix/store/r7r10qvsqlnvbzjkjinvscjlahqbxifl-gcc-wrapper-11.3.0/bin/strip
Using tar found on system at:
/nix/store/5p3qyadsv163m7zvqssiw80zh6xfv2jv-gnutar-1.34/bin/tar
No uhc found
building
Preprocessing library for servant-openapi3-2.0.1.5..
Building library for servant-openapi3-2.0.1.5..
[ 1 of 10] Compiling Servant.OpenApi.Internal.Orphans ( src/Servant/OpenApi/Internal/Orphans.hs, dist/build/Servant/OpenApi/Internal/Orphans.o, dist/build/Servant/OpenApi/Internal/Orphans.dyn_o )

src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’
   |
16 | instance (Typeable (SourceT m a), ToSchema a) => ToSchema (SourceT m a) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.API ( src/Servant/OpenApi/Internal/TypeLevel/API.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/API.o, dist/build/Servant/OpenApi/Internal/TypeLevel/API.dyn_o )

src/Servant/OpenApi/Internal/TypeLevel/API.hs:88:34: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
88 | type family BodyTypes' c api :: [*] where
   |                                  ^
[ 3 of 10] Compiling Servant.OpenApi.Internal ( src/Servant/OpenApi/Internal.hs, dist/build/Servant/OpenApi/Internal.o, dist/build/Servant/OpenApi/Internal.dyn_o )

src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
    |
241 | instance (Typeable (WithStatus s a), ToSchema a) => ToSchema (WithStatus s a) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.TMap ( src/Servant/OpenApi/Internal/TypeLevel/TMap.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.o, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.dyn_o )
[ 5 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.Every ( src/Servant/OpenApi/Internal/TypeLevel/Every.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.o, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.dyn_o )

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:37: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                     ^

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:61: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                                             ^
[ 6 of 10] Compiling Servant.OpenApi.Internal.TypeLevel ( src/Servant/OpenApi/Internal/TypeLevel.hs, dist/build/Servant/OpenApi/Internal/TypeLevel.o, dist/build/Servant/OpenApi/Internal/TypeLevel.dyn_o )
[ 7 of 10] Compiling Servant.OpenApi.Internal.Test ( src/Servant/OpenApi/Internal/Test.hs, dist/build/Servant/OpenApi/Internal/Test.o, dist/build/Servant/OpenApi/Internal/Test.dyn_o )
[ 8 of 10] Compiling Servant.OpenApi.Test ( src/Servant/OpenApi/Test.hs, dist/build/Servant/OpenApi/Test.o, dist/build/Servant/OpenApi/Test.dyn_o )
[ 9 of 10] Compiling Servant.OpenApi  ( src/Servant/OpenApi.hs, dist/build/Servant/OpenApi.o, dist/build/Servant/OpenApi.dyn_o )
[10 of 10] Compiling Servant.OpenApi.TypeLevel ( src/Servant/OpenApi/TypeLevel.hs, dist/build/Servant/OpenApi/TypeLevel.o, dist/build/Servant/OpenApi/TypeLevel.dyn_o )
[ 1 of 10] Compiling Servant.OpenApi.Internal.Orphans ( src/Servant/OpenApi/Internal/Orphans.hs, dist/build/Servant/OpenApi/Internal/Orphans.p_o )

src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’
   |
16 | instance (Typeable (SourceT m a), ToSchema a) => ToSchema (SourceT m a) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.API ( src/Servant/OpenApi/Internal/TypeLevel/API.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/API.p_o )

src/Servant/OpenApi/Internal/TypeLevel/API.hs:88:34: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
88 | type family BodyTypes' c api :: [*] where
   |                                  ^
[ 3 of 10] Compiling Servant.OpenApi.Internal ( src/Servant/OpenApi/Internal.hs, dist/build/Servant/OpenApi/Internal.p_o )

src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
    |
241 | instance (Typeable (WithStatus s a), ToSchema a) => ToSchema (WithStatus s a) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.TMap ( src/Servant/OpenApi/Internal/TypeLevel/TMap.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/TMap.p_o )
[ 5 of 10] Compiling Servant.OpenApi.Internal.TypeLevel.Every ( src/Servant/OpenApi/Internal/TypeLevel/Every.hs, dist/build/Servant/OpenApi/Internal/TypeLevel/Every.p_o )

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:37: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                     ^

src/Servant/OpenApi/Internal/TypeLevel/Every.hs:51:61: warning: [-Wstar-is-type]
    Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
    relies on the StarIsType extension, which will become
    deprecated in the future.
    Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
   |
51 | class EveryTF cs x => Every (cs :: [* -> Constraint]) (x :: *) where
   |                                                             ^
[ 6 of 10] Compiling Servant.OpenApi.Internal.TypeLevel ( src/Servant/OpenApi/Internal/TypeLevel.hs, dist/build/Servant/OpenApi/Internal/TypeLevel.p_o )
[ 7 of 10] Compiling Servant.OpenApi.Internal.Test ( src/Servant/OpenApi/Internal/Test.hs, dist/build/Servant/OpenApi/Internal/Test.p_o )
[ 8 of 10] Compiling Servant.OpenApi.Test ( src/Servant/OpenApi/Test.hs, dist/build/Servant/OpenApi/Test.p_o )
[ 9 of 10] Compiling Servant.OpenApi  ( src/Servant/OpenApi.hs, dist/build/Servant/OpenApi.p_o )
[10 of 10] Compiling Servant.OpenApi.TypeLevel ( src/Servant/OpenApi/TypeLevel.hs, dist/build/Servant/OpenApi/TypeLevel.p_o )
Preprocessing test suite 'doctests' for servant-openapi3-2.0.1.5..
Building test suite 'doctests' for servant-openapi3-2.0.1.5..
[1 of 2] Compiling Build_doctests   ( dist/build/doctests/autogen/Build_doctests.hs, dist/build/doctests/doctests-tmp/Build_doctests.o )
[2 of 2] Compiling Main             ( test/doctests.hs, dist/build/doctests/doctests-tmp/Main.o )
Linking dist/build/doctests/doctests ...
Preprocessing test suite 'spec' for servant-openapi3-2.0.1.5..
Building test suite 'spec' for servant-openapi3-2.0.1.5..
[1 of 2] Compiling Servant.OpenApiSpec ( test/Servant/OpenApiSpec.hs, dist/build/spec/spec-tmp/Servant/OpenApiSpec.o, dist/build/spec/spec-tmp/Servant/OpenApiSpec.dyn_o )
[2 of 2] Compiling Main             ( test/Spec.hs, dist/build/spec/spec-tmp/Main.o, dist/build/spec/spec-tmp/Main.dyn_o )
Linking dist/build/spec/spec ...
running tests
Running 2 test suites...
Test suite doctests: RUNNING...

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Orphans.hs:16:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (SourceT m a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (SourceT m a)’

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal.hs:241:10: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘Typeable (WithStatus s a)’ matches
        a built-in instance
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the instance declaration for ‘ToSchema (WithStatus s a)’
/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi.hs:506: failure in expression `hspec $ validateEveryToJSON (Proxy :: Proxy UserAPI)'
expected:
          [User]...
          ...
          User...
          ...
          UserId...
          ...
          Finished in ... seconds
          ...3 examples, 0 failures...
 but got:
          [User] [✔]
            +++ OK, passed 100 tests.
          User [✔]
            +++ OK, passed 100 tests.
          UserId [✔]
            +++ OK, passed 100 tests.

          Finished in 0.0314 seconds
          3 examples, 0 failures
           ^

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Test.hs:51: failure in expression `hspec $ context "ToJSON matches ToSchema" $ validateEveryToJSON (Proxy :: Proxy UserAPI)'
expected:
          ToJSON matches ToSchema
            User...
          ...
            UserId...
          ...
          Finished in ... seconds
          ...2 examples, 0 failures...
 but got:
          ToJSON matches ToSchema
            User [✔]
              +++ OK, passed 100 tests.
            UserId [✔]
              +++ OK, passed 100 tests.
            ^

          Finished in 0.0027 seconds
          2 examples, 0 failures

/build/servant-openapi3-2.0.1.5/src/Servant/OpenApi/Internal/Test.hs:108: failure in expression `:{
  hspec $
    context "read . show == id" $
      props
        (Proxy :: Proxy [Eq, Show, Read])
        (\x -> read (show x) === x)
        (Proxy :: Proxy [Bool, Int, String])
:}'
expected:
          read . show == id
            Bool...
          ...
            Int...
          ...
            [Char]...
          ...
          Finished in ... seconds
          ...3 examples, 0 failures...
 but got:
          read . show == id
            Bool [✔]
              +++ OK, passed 100 tests.
            Int [✔]
              +++ OK, passed 100 tests.
            [Char] [✔]
              +++ OK, passed 100 tests.
            ^

          Finished in 0.0159 seconds
          3 examples, 0 failures

Examples: 90  Tried: 85  Errors: 0  Failures: 3
-i
-i/build/servant-openapi3-2.0.1.5/dist/build/autogen
-i/build/servant-openapi3-2.0.1.5/dist/build
-i/build/servant-openapi3-2.0.1.5/src
-package-env=-
-hide-all-packages
-no-user-package-db
-package-db=/build/tmp.m40j6lP8RJ/package.conf.d
-package-db=dist/package.conf.inplace
-optP-include
-optPdist/build/autogen/cabal_macros.h
-package-id=QuickCheck-2.14.2-CJDnMWXQCpp1Tgm6F43kjb
-package-id=aeson-2.0.3.0-HlWJjVNsI9B9POFOQBJXQw
-package-id=aeson-pretty-0.8.9-BP2fiCVwamN3O1pHzEaCDN
-package-id=base-4.15.1.0
-package-id=base-compat-0.11.2-D5DT1MGmUKa4Ww8Uu5S4h5
-package-id=bytestring-0.10.12.1
-package-id=hspec-2.10.0-KSv2aoXinXhHlKoI6lz6j0
-package-id=http-media-0.8.0.0-JdgogMjUm0g6z6er6ZVrgu
-package-id=insert-ordered-containers-0.2.5.1-KPzpTzYDj1PDydVJeixuTd
-package-id=lens-5.0.1-IyoHbjke83qLG0yAxj1Z63
-package-id=openapi3-3.2.2-7qfyBNzxmFMIDpj109EOZs
-package-id=servant-0.19-GGif3G3NYIoEj4gSR8L6J7
-package-id=singleton-bool-0.1.6-NzHHXQRw9fHRfIkf79Ywi
-package-id=text-1.2.5.0
-package-id=unordered-containers-0.2.17.0-5tsTUc3qaP8lsa0vPeGcq
-package-id=directory-1.3.6.2
-package-id=doctest-0.18.2-Azd6gA1KUSO3PrMqh8IR4K
-package-id=filepath-1.4.2.1
Servant.OpenApi
Servant.OpenApi.Test
Servant.OpenApi.TypeLevel
Servant.OpenApi.Internal
Servant.OpenApi.Internal.Orphans
Servant.OpenApi.Internal.Test
Servant.OpenApi.Internal.TypeLevel
Servant.OpenApi.Internal.TypeLevel.API
Servant.OpenApi.Internal.TypeLevel.Every
Servant.OpenApi.Internal.TypeLevel.TMap
Test suite doctests: FAIL
Test suite logged to: dist/test/servant-openapi3-2.0.1.5-doctests.log
Test suite spec: RUNNING...

Servant.OpenApi
  HasOpenApi
    Todo API [✔]
    Hackage API (with tags) [✔]
    GetPost API (test subOperations) [✔]
    Comprehensive API [✔]
    UVerb API [✔]

Finished in 0.0040 seconds
5 examples, 0 failures
Test suite spec: PASS
Test suite logged to: dist/test/servant-openapi3-2.0.1.5-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
maksbotan commented 2 years ago

Hmm, strange. It worked for me and CI passed. I will look into this later. Does this block you?

sternenseemann commented 2 years ago

No, I can just disable tests for now, as it seems to be a false negative.

fpringle commented 10 months ago

Hi, was this ever solved?