I forgot to follow up on this: the issue in Asana was fixed on their side
last week.

We haven't received any other reports of sites these methods are causing
issues for, so it's looking pretty good so far.


On Fri, Jul 5, 2013 at 8:38 PM, Till Schneidereit <t...@tillschneidereit.net
> wrote:

>
>
>
> On Fri, Jul 5, 2013 at 6:53 PM, Rick Waldron <waldron.r...@gmail.com>wrote:
>
>>
>>
>>
>> On Thu, Jul 4, 2013 at 8:13 PM, Till Schneidereit <
>> t...@tillschneidereit.net> wrote:
>>
>>> Just as with the recent addition of Array.prototype.values(), we're
>>> running into problems with Array.prototype.find()[1].
>>>
>>> Asana uses an internal framework called "Luna" that contains an
>>> "IIterable". This defines[2][3], among others, `find` and `findIndex`
>>> functions with signatures that aren't compatible with the ones specified in
>>> ES6. That causes the entire application to not work. At all.
>>>
>>
>>> I'll try contacting Asana in the hope of them fixing the issue, but
>>> this'll probably not be the last issue with `find`.
>>>
>>
>>>
>>> [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=890070
>>> [2]:
>>> https://d3ki9tyy5l5ruj.cloudfront.net/prod/build/bundles/5e40e508ea86bea48248afec47fb23f8f1100243/apps/asana/bundle.js?cb=1372896568000,
>>> lines 3030 - 3044
>>> [3]: https://gist.github.com/anonymous/84cde55714eeee7d24a2 (in case
>>> the original link changes)
>>>
>>
>>
>>
>> Thanks for the report!
>>
>> I'm also seeing:
>> - filter
>> - forEach
>> - indexOf
>> - join
>> - map
>> - reduce
>>
>> (From L3024-3074)
>>
>> It appears that an IIterable is used to create the IVector, which then
>> has its patchClass method called with (built-in) Array (L3205). The
>> patchClass operation is then extending the Array.prototype with all of the
>> custom methods. I've reduced it from the provided code:
>> https://gist.github.com/rwldrn/2864ff4b3f804005f370
>>
>
> Ah, great, thanks for doing that! The reduced version confirms what I
> thought was going on: `patchClass`, `patchInstance` and `addToClass` all
> only add the given function to the given target if a same-named function
> doesn't already exist. As the other potentially-replaces functions all
> predate the library, their semantics match.
>
>
>>
>> I'm confident this can be fixed internally with little to no problem
>> (assuming they have adequate tests written to support their codebase)
>>
>
> I very much agree, yes. We only had this in Nightly builds for about a
> week now, but it's somewhat reassuring that, as of yet, this is the only
> issue we're aware of with `find` and `findIndex`.
>
>
> till
>
>
>>
>>  Rick
>>
>>
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to