I think you absolutely should deprecate the old API and create a new one. Users can easily miss a line in a release note and are bound to fall over this in future. Changing the existing API is as bad as publishing a Git tag and then changing what the tag points to, if not worse.
On Thu, Sep 2, 2010 at 12:50 PM, Martin Logan <[email protected]>wrote: > I think the old API should work if possible and be deprecated, error and > all. A fair amount of people use the lib and we will loose them with > backwards incompatibility. At the least we could have an exception if the > old method is used saying that it is no longer supported. It seems the right > thing to do with this lib > > > On Thu, Sep 2, 2010 at 9:11 AM, Eric Merritt <[email protected]>wrote: > >> What do you mean by an exception. I suspect a general note in the >> readme and a mail to the list as part of the release announcement >> should do it. >> >> >> ---------- Forwarded message ---------- >> From: Martin Logan <[email protected]> >> Date: Wed, Sep 1, 2010 at 5:23 PM >> Subject: Re: ktuo_encode bug >> To: [email protected] >> >> >> There should be an exception explaining what happened though for current >> users. >> >> On Wed, Sep 1, 2010 at 4:59 PM, Eric Merritt <[email protected]> >> wrote: >> > >> > I think breaking backwards compatibility is fine as long as we do more >> > then a point release. Its a better system moving forward. >> > >> > On Wed, Sep 1, 2010 at 4:42 PM, Samuel <[email protected]> wrote: >> > >> If they are tested and fixed I don't see why you shouldn't push them >> > >> to the canonical. >> > > >> > > I'm quickchecking it, and found another bug. I'll push whenever I >> > > finish decoding. >> > > >> > > There is, however, one thing that makes me need a kind of incompatible >> > > change. I must be able to recover a term after encoding it, but right >> > > now, an empty array and an empty string decode to the same term: [] so >> > > it is impossible to recover the original term once you encoded it to >> > > JSON. >> > > >> > > The solution I like is decoding strings as binaries. It's nice, also, >> > > because ktj_encode expect strings to be binaries. The change is >> > > straightforward, but breaks backwards compatibility. What's your idea >> > > about that? >> > > >> > > --- a/src/ktuo_parse_utils.erl >> > > +++ b/src/ktuo_parse_utils.erl >> > > @@ -78,7 +78,7 @@ stringish_body(Delim, [$\n | T], Acc, NewLines, >> _Chars) -> >> > > stringish_body(Delim, [$\r | T], Acc, NewLines, _Chars) -> >> > > stringish_body(Delim, T, [$\r | Acc], NewLines + 1, 0); >> > > stringish_body(Delim, [Delim | T], Acc, NewLines, Chars) -> >> > > - {lists:reverse(Acc), T, {NewLines, Chars + 1}}; >> > > + {list_to_binary(lists:reverse(Acc)), T, {NewLines, Chars + 1}}; >> > > stringish_body(Delim, [H | T], Acc, NewLines, Chars) -> >> > > stringish_body(Delim, T, [H | Acc], NewLines, Chars + 1); >> > > stringish_body(_Delim, [], _Acc, NewLines, Chars) -> >> > > >> > > >> > > Cheers >> > >> >> > >> Eric >> > >> >> > >> On Sat, Aug 28, 2010 at 2:19 PM, Samuel <[email protected]> >> wrote: >> > >>> Hi, >> > >>> >> > >>> Way ago I opened an issue in ktuo, it has a bug encoding slashes: >> > >>> http://code.google.com/p/ktuo/issues/detail?id=3 >> > >>> >> > >>> I forget about that and it hit me again after cloning from >> erlware/ktuo. >> > >>> >> > >>> it is tested and fixed in my clon: >> > >>> git://github.com/samuelrivas/ktuo.git branch issue-3. Should I push >> it >> > >>> to the official repository? ;) >> > >>> >> > >>> Cheers >> > >>> -- >> > >>> Samuel >> > >>> >> > >>> -- >> > >>> You received this message because you are subscribed to the Google >> Groups "erlware-dev" group. >> > >>> To post to this group, send email to [email protected]. >> > >>> To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> > >>> For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> > >>> >> > >>> >> > >> >> > >> -- >> > >> You received this message because you are subscribed to the Google >> Groups "erlware-dev" group. >> > >> To post to this group, send email to [email protected]. >> > >> To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> > >> For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> > >> >> > >> >> > > >> > > >> > > >> > > -- >> > > Samuel >> > > >> > > -- >> > > You received this message because you are subscribed to the Google >> Groups "erlware-dev" group. >> > > To post to this group, send email to [email protected]. >> > > To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> > > For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> > > >> > > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "erlware-dev" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> > For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> > >> >> -- >> You received this message because you are subscribed to the Google >> Groups "erlware-dev" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "erlware-dev" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<erlware-dev%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/erlware-dev?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "erlware-dev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<erlware-dev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/erlware-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "erlware-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/erlware-dev?hl=en.
