Intent to Ship: Array grouping

139 views
Skip to first unread message

Shu-yu Guo

unread,
Sep 20, 2022, 8:30:09 PM9/20/22
to blink-dev

Contact emails

s...@chromium.org

Explainer

https://github.com/tc39/proposal-array-grouping/blob/main/README.md

Specification

https://tc39.es/proposal-array-grouping/

Summary

Adds news Array.prototype methods groupBy() and groupByToMap() to perform a grouping or bucketing operation.



Blink component

Blink>JavaScript>Language

TAG review



TAG review status

Not applicable

Risks



Interoperability and Compatibility

Web compat risk due to Sugar. The original proposed name of Array.prototype.groupBy was found to be incompatible. See https://github.com/tc39/proposal-array-grouping/issues/37 Currently named `group` and `groupToMap` with no known incompatibilities.



Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1739648) Firefox shipped in Nightly and found a web compat issue, and are attempting outreach: https://bugzilla.mozilla.org/show_bug.cgi?id=1750812#c5 Method was renamed to `group` and `groupToMap`

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=234327)

Web developers: Strongly positive (https://twitter.com/rauschma/status/1470854996459769867?s=20&t=DDr_7gzapEKcfF2MbEVzHA)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

This feature adds two new built-in Array.prototype methods, which are debuggable like all other built-in methods.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name

--harmony-array-grouping

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=12499

Estimated milestones

DevTrial on desktop100
DevTrial on Android100


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5714791975878656

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Sep 21, 2022, 12:56:27 AM9/21/22
to Shu-yu Guo, blink-dev
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN-e9e_OXi4njvB46nEMzTJzpoGXWEjYXEgo-7-%3DYCuT2EEeew%40mail.gmail.com.

Daniel Bratell

unread,
Sep 21, 2022, 6:47:22 AM9/21/22
to Yoav Weiss, Shu-yu Guo, blink-dev

LGTM2 to ship group and groupToMap (a bit confusing that the summary uses the old names).

/Daniel

Chris Harrelson

unread,
Sep 21, 2022, 11:52:49 AM9/21/22
to Daniel Bratell, Yoav Weiss, Shu-yu Guo, blink-dev

Philip Jägenstedt

unread,
Sep 21, 2022, 11:53:37 AM9/21/22
to Daniel Bratell, Yoav Weiss, Shu-yu Guo, blink-dev
I assume that like most JS features this isn't tested in WPT but rather in Test262. Are the tests for this in Test262 all passing?

Shu-yu Guo

unread,
Sep 21, 2022, 12:20:15 PM9/21/22
to Philip Jägenstedt, Daniel Bratell, Yoav Weiss, blink-dev
On Wed, Sep 21, 2022 at 8:53 AM Philip Jägenstedt <foo...@chromium.org> wrote:
I assume that like most JS features this isn't tested in WPT but rather in Test262. Are the tests for this in Test262 all passing?

Correct, it is tested via test262. I've been checking that box assuming that it's a stand-in for test262, and listing the test262 tests in the "WPT description" field in chromestatus. The tests in this case are located at:
All of the test262 tests are currently passing on V8.
 

On Wed, Sep 21, 2022 at 12:47 PM Daniel Bratell <brat...@gmail.com> wrote:

LGTM2 to ship group and groupToMap (a bit confusing that the summary uses the old names).

Thanks for pointing this out. Updated.

Philip Jägenstedt

unread,
Sep 21, 2022, 12:42:20 PM9/21/22
to Shu-yu Guo, Daniel Bratell, Yoav Weiss, blink-dev
On Wed, Sep 21, 2022 at 6:20 PM Shu-yu Guo <s...@chromium.org> wrote:
On Wed, Sep 21, 2022 at 8:53 AM Philip Jägenstedt <foo...@chromium.org> wrote:
I assume that like most JS features this isn't tested in WPT but rather in Test262. Are the tests for this in Test262 all passing?

Correct, it is tested via test262. I've been checking that box assuming that it's a stand-in for test262, and listing the test262 tests in the "WPT description" field in chromestatus. The tests in this case are located at:
All of the test262 tests are currently passing on V8.

Great, thanks for confirming! WPT infra folks have discussed a way of running Test262 as part of WPT and seeing results on wpt.fyi, but until then it's hard to get a view into the current results. 
Reply all
Reply to author
Forward
0 new messages