Ganesh Sittampalam | 29 Jan 23:15 2013
Picon

Heads up: planned removal of String instances from HTTP package

Hi,

tl;dr: I'm planning on removing the String instances from the HTTP
package. This is likely to break code. Obviously it will involve a major
version bump.

The basic reason is that this instance is rather broken in itself. A
String ought to represent Unicode data, but the HTTP wire format is
bytes, and HTTP makes no attempt to handle encoding.

This was discussed on the libraries <at>  list a while back, but I'm happy to
discuss further if there's a general feeling that this is a bad thing to do:

http://www.haskell.org/pipermail/libraries/2012-September/018426.html

I will probably upload the new version in a week or two.

Cheers,

Ganesh
Johan Tibell | 29 Jan 23:46 2013
Picon

Re: Heads up: planned removal of String instances from HTTP package

On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam <ganesh <at> earth.li> wrote:
> tl;dr: I'm planning on removing the String instances from the HTTP
> package. This is likely to break code. Obviously it will involve a major
> version bump.
>
> The basic reason is that this instance is rather broken in itself. A
> String ought to represent Unicode data, but the HTTP wire format is
> bytes, and HTTP makes no attempt to handle encoding.
>
> This was discussed on the libraries <at>  list a while back, but I'm happy to
> discuss further if there's a general feeling that this is a bad thing to do:
>
> http://www.haskell.org/pipermail/libraries/2012-September/018426.html
>
> I will probably upload the new version in a week or two.

I think it's the right thing to do. Providing a little upgrade guide
should help things to go smoother.
Ganesh Sittampalam | 30 Jan 08:00 2013
Picon

Re: Heads up: planned removal of String instances from HTTP package

On 29/01/2013 22:46, Johan Tibell wrote:
> On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam <ganesh <at> earth.li> wrote:
>> tl;dr: I'm planning on removing the String instances from the HTTP
>> package. This is likely to break code. Obviously it will involve a major
>> version bump.
> 
> I think it's the right thing to do. Providing a little upgrade guide
> should help things to go smoother.

One obvious cheap-and-dirty migration is via a newtype wrapper for
String that embeds the old broken behaviour (char8 encoding). Perhaps
the package should provide that? (with appropriate warnings etc)

Ganesh
Alfredo Di Napoli | 30 Jan 09:01 2013
Picon

Re: Heads up: planned removal of String instances from HTTP package

Maybe (just my 2 cents!) since you are going to broke the API anyway, go for it

and seize the occasion to really clean up :)
Obviously I'm saying this from a non-http-user point of view, maybe if I had
some code in production affected by this, my suggestion would have been different :P

Regards,
A.

On 30 January 2013 07:00, Ganesh Sittampalam <ganesh <at> earth.li> wrote:
On 29/01/2013 22:46, Johan Tibell wrote:
> On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam <ganesh <at> earth.li> wrote:
>> tl;dr: I'm planning on removing the String instances from the HTTP
>> package. This is likely to break code. Obviously it will involve a major
>> version bump.
>
> I think it's the right thing to do. Providing a little upgrade guide
> should help things to go smoother.

One obvious cheap-and-dirty migration is via a newtype wrapper for
String that embeds the old broken behaviour (char8 encoding). Perhaps
the package should provide that? (with appropriate warnings etc)

Ganesh

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ganesh Sittampalam | 30 Jan 20:12 2013
Picon

Re: Heads up: planned removal of String instances from HTTP package

Unfortunately I lack the time for a wholesale cleanup. If others have
proposals and are willing to supply the patches that's a different matter!

On 30/01/2013 08:01, Alfredo Di Napoli wrote:
> Maybe (just my 2 cents!) since you are going to broke the API anyway, go
> for it
> and seize the occasion to really clean up :)
> Obviously I'm saying this from a non-http-user point of view, maybe if I had
> some code in production affected by this, my suggestion would have been
> different :P
> 
> Regards,
> A.
> 
> On 30 January 2013 07:00, Ganesh Sittampalam <ganesh <at> earth.li
> <mailto:ganesh <at> earth.li>> wrote:
> 
>     On 29/01/2013 22:46, Johan Tibell wrote:
>     > On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam
>     <ganesh <at> earth.li <mailto:ganesh <at> earth.li>> wrote:
>     >> tl;dr: I'm planning on removing the String instances from the HTTP
>     >> package. This is likely to break code. Obviously it will involve
>     a major
>     >> version bump.
>     >
>     > I think it's the right thing to do. Providing a little upgrade guide
>     > should help things to go smoother.
> 
>     One obvious cheap-and-dirty migration is via a newtype wrapper for
>     String that embeds the old broken behaviour (char8 encoding). Perhaps
>     the package should provide that? (with appropriate warnings etc)
> 
>     Ganesh
> 
>     _______________________________________________
>     Haskell-Cafe mailing list
>     Haskell-Cafe <at> haskell.org <mailto:Haskell-Cafe <at> haskell.org>
>     http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 
> 
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 

Gmane