-
Notifications
You must be signed in to change notification settings - Fork 43
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
Doctest failures on 0.3.5 #49
Comments
That happens because order of pairs in json object is not stable. @fizruk, we could add e.g. aeson-pretty as a dep to doctests, then encoding will be stable |
But this is not because of |
This is still the case (for me) with 0.3.7.2 on archlinux32. |
Ok, how about this? urlEncodeParams :: [(Text, [Text])] -> BSL.ByteString
urlEncodeParams = toLazyByteString . mconcat . intersperse (shortByteString "&") . map encodePair
where
escape = urlEncodeQuery . Text.encodeUtf8
encodePair (k, "") = escape k
encodePair (k, v) = escape k <> shortByteString "=" <> escape v
urlEncodeForm :: Form -> BSL.ByteString
urlEncodeForm = urlEncodeParams . toList
urlEncodeFormStable :: Form -> BSL.ByteString
urlEncodeFormStable = urlEncodeParams . sortOn fst . toList We can use @phadej do you approve? |
👍 |
I don't have 32bit machine to test on. If someone have, than please make a change, verify locally, and submit a patch. @fizruk already did the work, I just want to be sure! Note: http-api-date isn't broken, it's only about fixing volatile tests on 32bit arch, so it's low priority for me |
ok, I tried applying the following patch:
but probably did something fatally wrong (sry, I'm new to haskell), because I get (both on 32 and 64 bit):
|
@deep-42-thought ok, hang on, I'll send a PR shortly. |
These happened only on 32bit linux, but it could mean they're just transient.
The text was updated successfully, but these errors were encountered: