Hi folks,

It looks like the javascript client library, lib/js/thrift.js, needs an
update to keep pace with Jquery 1.7+.

Specifically, the newer Jqueries have dropped jQuery._Deferred, which gets
exercised by the client stubs generated with js:jquery.  See THRIFT-1514
for how things break.

Looking over the code, this may be as simple as dropping the underscore and
using JQuery.Deferred which is just a superset that also handles fail and
(in 1.7+) progress callbacks.

Orrrrrrrrr...perhaps we can do some refactoring?  From quick readthrough,
it looks like we're returning a very "promise-like" object not unlike
jQuery,ajax() itself.  Perhaps things could be simplified or made more
standard?

I see Roger and Henrique in the commit logs.  Can you guys, or anyone else
on the list who is familiar with this part of the code, weigh in on uptake
of the methods that are visible to client code (success/error/complete) and
on any jQuery version-specific quirks to watch out for in an update?

Happy to write patches and test things here.  Will submit something in a
day or two if no feedback, but hoping for insights.

Cheers,
Andrew

Reply via email to