-
Notifications
You must be signed in to change notification settings - Fork 93
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
parseWith does one redundant request #70
Comments
Also got bitten by this while using hedis and had to downgrade to < 0.12. Is there a fix in sight? |
This is fixed in either 0.12.1.1 or 0.12.1.2. |
@bos I guess it's still broken, tried test-case on 0.12.1.2:
|
Sorry! I wrote a regression test, saw that it actually works and then realized that thing that I tried in previous comment was tried against old attoparsec (not from sandbox). @bos would you be interested in this PR containing regression test or not? https://github.com/k-bx/attoparsec/compare/gh-70-parsewith-reqs Thanks! |
Thanks. That regression test could be useful in theory, but it tests a much bigger surface area than is necessary to reproduce the bug and is overly complicated. These make it less than ideal from my perspective. |
I later saw you wrote some tests that might cover this issue in #75 , so I see no point having more tests (if those do cover it). |
TLDR version (small test-case for attoparsec):
Output for 0.11.3.4:
Output for 0.12.1.0:
More info on bug
There's this crazy bug I'm getting: informatikr/hedis#15
It turned out that (if I'm not mistaken) because hedis reads responses from redis like this https://github.com/informatikr/hedis/blob/master/src/Database/Redis/ProtocolPipelining.hs#L116 -- it relies on attoparsec's behaviour to call socket-reading function exactly needed number of times. Here's a piece of code (should be compiled inside hedis package to see it's hidden modules):
For attoparsec version 0.11.3.4 it produces this output:
While for 0.12.1.0 it produces:
The text was updated successfully, but these errors were encountered: