-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compile failure #1
Comments
I'm not quite sure how to fix this. I tested with ghc 8.0. I tried building
on ghc 7.10, and got the error you showed me. Can it be fixed with a
constraint? The wai version seems to be the same between the two stackage
lts versions.
…On Wed, May 31, 2017 at 11:40 AM Herbert Valerio Riedel < ***@***.***> wrote:
See also
https://matrix.hackage.haskell.org/package/wai-middleware-json-errors
This is most likely caused due to missing or inaccurate version bounds:
Configuring component lib from wai-middleware-json-errors-0.1.0...
Preprocessing library wai-middleware-json-errors-0.1.0...
[1 of 2] Compiling Paths_wai_middleware_json_errors ( /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/autogen/Paths_wai_middleware_json_errors.hs, /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/Paths_wai_middleware_json_errors.o )
[2 of 2] Compiling Network.Wai.Middleware.JsonErrors ( src/Network/Wai/Middleware/JsonErrors.hs, /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/Network/Wai/Middleware/JsonErrors.o )
src/Network/Wai/Middleware/JsonErrors.hs:45:7:
Couldn't match expected type ‘Data.ByteString.Builder.Internal.Builder’
with actual type ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
NB: ‘Data.ByteString.Builder.Internal.Builder’
is defined in ‘Data.ByteString.Builder.Internal’
in package ‘bytestring-0.10.6.0’
‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
is defined in ‘Data.Binary.Builder.Base’
in package ‘binary-0.7.5.0’
In the second argument of ‘($)’, namely
‘fromLazyByteString
$ encode
$ object
["error" .= String (decodeUtf8 $ toStrict b),
"status" .= Number (fromIntegral $ statusCode s)]’
In the expression:
responseBuilder s (("Content-Type", "application/json") : hs)
$ fromLazyByteString
$ encode
$ object
["error" .= String (decodeUtf8 $ toStrict b),
"status" .= Number (fromIntegral $ statusCode s)]
In an equation for ‘jsonErrorResponse’:
jsonErrorResponse s hs b
= responseBuilder s (("Content-Type", "application/json") : hs)
$ fromLazyByteString
$ encode
$ object
["error" .= String (decodeUtf8 $ toStrict b),
"status" .= Number (fromIntegral $ statusCode s)]
src/Network/Wai/Middleware/JsonErrors.hs:52:63:
Couldn't match expected type ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
with actual type ‘Data.ByteString.Builder.Internal.Builder’
NB: ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
is defined in ‘Data.Binary.Builder.Base’
in package ‘binary-0.7.5.0’
‘Data.ByteString.Builder.Internal.Builder’
is defined in ‘Data.ByteString.Builder.Internal’
in package ‘bytestring-0.10.6.0’
In the first argument of ‘toLazyByteString’, namely ‘b’
In the first argument of ‘Just’, namely ‘(toLazyByteString b)’
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA_ecSw-4whD7pBQz8eQpZ-2RwMT0w0ks5r_aYHgaJpZM4Nr9e8>
.
|
@seanhess as it seems you're using Stack, I think the simplest proper way would be to add I've emulated more or less what
And now it's all green at https://matrix.hackage.haskell.org/package/wai-middleware-json-errors |
Great, thanks for your help!
I just added pvp-bounds: both, and uploaded 0.1.1. Let's see if it works.
…On Wed, May 31, 2017 at 2:27 PM Herbert Valerio Riedel < ***@***.***> wrote:
@seanhess <https://github.com/seanhess> as it seems you're using Stack, I
think the simplest proper way would be to add pvp-bounds: both (see docs
here
<https://docs.haskellstack.org/en/stable/yaml_configuration/#pvp-bounds>)
to your stack.yaml file, and use (mostly) the version bounds inferred
from the stackage snapshot used.
I've emulated more or less what pvp-bounds: both does with the help of
staversion (as I don't have Stack installed), and after some trial &
error and tweaking the bounds, I came up with the following bounds which I've
already revised into the affected release
<https://hackage.haskell.org/package/wai-middleware-json-errors-0.1.0/revisions/>
:
build-depends:
aeson >=1.0.2.1 && <1.3
, binary >=0.8.3 && <0.9
, bytestring >=0.10.6 && <0.11
, http-types >=0.9.1 && <0.10
, text >=1.2.2.1 && <1.3
, wai >=3.2.1.1 && <3.3
, base >=4.8 && <5
And now it's all green at
https://matrix.hackage.haskell.org/package/wai-middleware-json-errors
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA_ea12T2WdL_LNg1AO0EXDmPiXHNGBks5r_c02gaJpZM4Nr9e8>
.
|
See also https://matrix.hackage.haskell.org/package/wai-middleware-json-errors
This is most likely caused due to missing or inaccurate version bounds:
The text was updated successfully, but these errors were encountered: