riak-haskell-client icon indicating copy to clipboard operation
riak-haskell-client copied to clipboard

Don't escape by default

Open mitchellwrosen opened this issue 7 years ago • 4 comments

I realized the other day that every helper function that constructs requests, parses responses, etc. escapes the bucket types and buckets. This seems like the wrong default. If I don't care about the HTTP interface, I shouldn't have to pay the performance hit.

mitchellwrosen avatar Feb 06 '18 16:02 mitchellwrosen

https://github.com/riak-haskell-client/riak-haskell-client/blob/db677cfa370ebc89edd2c7f8bf7f7e347b0eae5d/src/Network/Riak/Request.hs#L121

Looks like it's not even consistent internally (this bucket type is not escaped for some reason), and there's a TODO: don't escape ;)

mitchellwrosen avatar Feb 06 '18 16:02 mitchellwrosen

FYI, I am working on a large refactoring that will take care of this issue (and more). It is located here https://github.com/mitchellwrosen/riak-haskell-client

When and if my work stabilizes I'll happily discuss whether or not it's appropriate to try and merge upstream, but for now, I am happy working on a separate fork with no intention of publishing to Hackage.

mitchellwrosen avatar Feb 07 '18 20:02 mitchellwrosen

Let me start with a thank you for the work you’re putting into this.

When you are happy with the state of the work I would be interested in merging it back in. I’ve long been unhappy with how a number of things are implemented in this library and have wanted to fix them in the right way. I would be interested in what deficiencies you’re looking to fix and how you are using the library (if indeed you are).

Right now I’m no longer a consumer of this library which makes it hard to find the motivation and direction to make major improvements.

On Thu, 8 Feb 2018 at 7:52 am, Mitchell Rosen [email protected] wrote:

FYI, I am working on a large refactoring that will take care of this issue (and more). It is located here https://github.com/mitchellwrosen/riak-haskell-client

When and if my work stabilizes I'll happily discuss whether or not it's appropriate to try and merge upstream, but for now, I am happy with working on a separate fork with no intention of publishing to Hackage.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/riak-haskell-client/riak-haskell-client/issues/104#issuecomment-363906558, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKbuXu0ej5rthrwoZ3Ivdqc7wBNXImXks5tSg0MgaJpZM4R7ThN .

tmcgilchrist avatar Feb 07 '18 21:02 tmcgilchrist

-- TODO don't escape anything

Left by me probably. This is all related to #47.

The reason that I haven't removed all escaping is that it's not backward-compatible (like, newer version won't be able to read data written by older version). It's all there — https://github.com/riak-haskell-client/riak-haskell-client/issues/47#issuecomment-221848269

llelf avatar Mar 27 '18 09:03 llelf