on master help sign in
Fix tests for some servant-auth pkgs on GHC 9

Turns out the tests broke because of base64-bytestring issue specific to GHC-9 that was fixed in 1.2.1.0. Fixes #1474

commit551d4936afca7c4c91e250ca150f7c6e005427a2 authorMaxim Koltsov <kolmax94@gmail.com> dateSat 30 Oct 2021, 20:43 (5 years ago) parentbd9e4b1
1 file changed+8−5
servant-auth/servant-auth-server/servant-auth-server.cabal+8−5
servant-auth/servant-auth-server/servant-auth-server.cabal+8−5
@@ -33,7 +33,7 @@ library
3333 build-depends:
3434 base >= 4.10 && < 4.16
3535 , aeson >= 1.3.1.1 && < 1.6
36− , base64-bytestring >= 1.0.0.1 && < 1.2
36+ , base64-bytestring >= 1.0.0.1 && < 1.3
3737 , blaze-builder >= 0.4.1.0 && < 0.5
3838 , bytestring >= 0.10.6.0 && < 0.11
3939 , case-insensitive >= 1.2.0.11 && < 1.3
@@ -55,6 +55,13 @@ library
5555 , unordered-containers >= 0.2.9.0 && < 0.3
5656 , wai >= 3.2.1.2 && < 3.3
5757
58+ if impl(ghc >= 9)
59+ build-depends:
60+ -- base64-bytestring 1.2.1.0 contains important fix for GHC-9, lower versions
61+ -- produce wrong results, thus corrupring JWT via jose package.
62+ -- See: https://github.com/haskell/base64-bytestring/pull/46
63+ base64-bytestring >= 1.2.1.0
64+
5865 exposed-modules:
5966 Servant.Auth.Server
6067 Servant.Auth.Server.Internal
@@ -87,8 +94,6 @@ test-suite readme
8794 default-language: Haskell2010
8895 if impl(ghcjs)
8996 buildable: False
90− if impl(ghc >= 9)
91− buildable: False
9297
9398test-suite spec
9499 type: exitcode-stdio-1.0
@@ -114,8 +119,6 @@ test-suite spec
114119 , servant
115120 , servant-server
116121 , transformers
117− if impl(ghc >= 9)
118− buildable: False
119122
120123 -- test dependencies
121124 build-depends: