Fails to build with http-enumerator >= 0.7 #5

Closed
hvr opened this Issue Sep 24, 2011 · 4 comments

Projects

None yet

5 participants

@hvr
hvr commented Sep 24, 2011

When trying to build pronk with http-enumerator-0.7.1 the compilation fails:

[1 of 4] Compiling Network.HTTP.LoadTest.Types ( lib/Network/HTTP/LoadTest/Types.hs, dist/build/Network/HTTP/LoadTest/Types.o )

lib/Network/HTTP/LoadTest/Types.hs:40:15:
    Not in scope: data constructor `Request'

lib/Network/HTTP/LoadTest/Types.hs:40:15:
    You cannot use `..' in a record pattern

lib/Network/HTTP/LoadTest/Types.hs:50:21:
    Not in scope: data constructor `Request'

lib/Network/HTTP/LoadTest/Types.hs:50:21:
    You cannot use `..' in a record pattern

This is due to an API change in http-enumerator (see http://hdiff.luite.com/cgit/http-enumerator/commit?id=0.7.0 ) which doesn't export the Request value-constructor anymore.

@ocharles
ocharles commented Oct 1, 2011

Mostly commenting to watch this issue, as it affects me too

@jabley
jabley commented Oct 1, 2011

I worked around this by configuring an explicit dependency less than 0.7.0.

diff --git a/pronk.cabal b/pronk.cabal
index ee93fce..0af7f1b 100644
--- a/pronk.cabal
+++ b/pronk.cabal
@@ -46,7 +46,7 @@ library
     case-insensitive,
     criterion >= 0.5.1.0,
     hashable >= 1.1.2.0,
-    http-enumerator,
+    http-enumerator < 0.7.0,
     http-types,
     statistics,
     text,

I've not created a pull request though, since I don't know whether this is the right thing to do (I don't know haskell or cabal).

@nraychaudhuri

Thanks a lot. It worked. Please submit your pull request because I could have saved few hours debugging the problem.

@hvr hvr added a commit to hvr/pronk that referenced this issue Oct 11, 2011
@hvr hvr Update pronk to new http-enumerator 0.7 API
This addresses the breakage reported in issue #5 by adapting the code in
question to the new API which doesn't expose the `Request` constructor
anymore. The code should work with the old and the new API and
therefore the build-dependancy doesn't need changing (although it
would be advisable to restrict the http-enumerator version to 0.7.*)
731416b
@bos
Owner
bos commented Oct 11, 2011

Thanks to @hvr for the proper fix!

@bos bos closed this Oct 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment