Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: graduate TextEncoder/TextDecoder, tests #15743

Closed
wants to merge 10 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 2, 2017

Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

util

@nodejs-github-bot nodejs-github-bot added the encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. label Oct 2, 2017
@mscdex
Copy link
Contributor

mscdex commented Oct 2, 2017

@@ -0,0 +1,72 @@
'use strict';

// From: https://github.com/w3c/web-platform-tests/blob/master/encoding/textdecoder-fatal-streaming.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the URL tests use a completely different format. These had to be ported over to work with out test suite.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the link to a specific sha instead of blob/master? Otherwise we lose track of the version of the test and if the upstream deletes a file it would be 404

@mhdawson
Copy link
Member

mhdawson commented Oct 3, 2017

Not objecting but wondering what the criteria was for deciding it was time to move out of experimental ?

@jasnell
Copy link
Member Author

jasnell commented Oct 3, 2017

what the criteria for deciding ...

there have been no bugs filed against it and the tests are all coming back good.

@jasnell jasnell added notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version. labels Oct 13, 2017
@jasnell
Copy link
Member Author

jasnell commented Oct 13, 2017

@tniessen
Copy link
Member

We might want to handle stability index changes of an API the same as semver-major when it comes to reviews (and yes, I know about the discussions about those rules, but I would like to generally be careful when it comes to exposing APIs.)

@jasnell
Copy link
Member Author

jasnell commented Oct 13, 2017

I'm -1 on requiring semver-major for bringing things out of experimental. This, for instance, would be a semver-minor addition under any other circumstances, there's really no reason that I can see to force this to a major.

@TimothyGu TimothyGu self-requested a review October 14, 2017 04:09
@tniessen
Copy link
Member

I was not saying we should treat such changes as semver-major, all I was trying to say is that we should review such decisions at least as careful as other public API changes, if not even more. I just referenced semver-major because those are the only changes which get "special treatment" right now.

@jasnell
Copy link
Member Author

jasnell commented Oct 16, 2017

Ping @nodejs/tsc ... If there are no objections by Wednesday this week I plan to land this.

@@ -0,0 +1,72 @@
'use strict';

// From: https://github.com/w3c/web-platform-tests/blob/master/encoding/textdecoder-fatal-streaming.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the link to a specific sha instead of blob/master? Otherwise we lose track of the version of the test and if the upstream deletes a file it would be 404

Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most tests need to be guarded with common.hasIntl.

@TimothyGu
Copy link
Member

nodejs/build#419

@jasnell
Copy link
Member Author

jasnell commented Oct 17, 2017

@joyeecheung ... Excellent suggestion
@TimothyGu ... Good catch

@jasnell
Copy link
Member Author

jasnell commented Oct 20, 2017

@joyeecheung and @TimothyGu ... updated!

@jasnell
Copy link
Member Author

jasnell commented Oct 20, 2017

@TimothyGu
Copy link
Member

New nointl CI with #16250 applied: https://ci.nodejs.org/job/node-test-commit-linux-nointl/7

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test shouldn't be skipped.

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should work even when ICU is not enabled.

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the exception of UTF-16BE, this test should work even when ICU is not enabled.

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the exception of UTF-16BE, this test should work even when ICU is not enabled.

@@ -2,6 +2,10 @@
'use strict';

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the exception of UTF-16BE, this test should work even when ICU is not enabled.

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should work even when ICU is not enabled.

@@ -2,6 +2,10 @@
'use strict';

const common = require('../common');

if (!common.hasIntl)
common.skip('missing Intl');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should work even when ICU is not enabled.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion, otherwise LGTM with @TimothyGu 's review addressed.

@@ -0,0 +1,76 @@
'use strict';

// From: https://github.com/w3c/web-platform-tests/blob/d74324b53ca6ebf9ffd51333c216cadfa6ea2303/encoding/textdecoder-fatal-streaming.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the first 7 characters of the SHA if we don't want a really long URL here. That works as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually prefer 10 characters, as that's what modern Git outputs IIRC.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, forgot about those :-)

@joyeecheung
Copy link
Member

joyeecheung commented Oct 21, 2017

There is a compilation error

In file included from ../deps/v8/src/setup-isolate-full.cc:8:
In file included from ../deps/v8/src/interpreter/interpreter.h:14:
In file included from ../deps/v8/src/builtins/builtins.h:8:
In file included from ../deps/v8/src/base/flags.h:8:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named 'max_align_t' in the global namespace
  using ::max_align_t;
        ~~^
1 error generated.

Looks like duplicate of nodejs/build#685 cc @nodejs/build
EDIT: looks like the support for that combination is removed anyway (nodejs/build#688), so probably we just need to remove that bot(ubuntu1204-clang341-64) or skip it when targeting branches newer than 8.

@gibfahn
Copy link
Member

gibfahn commented Oct 21, 2017

EDIT: looks like the support for that combination is removed anyway (nodejs/build#688), so probably we just need to remove that bot(ubuntu1204-clang341-64) or skip it when targeting branches newer than 8.

I've removed it, AIUI the need is for a run to make sure no-intl works, there's no need to have full coverage. If anyone disagrees feel free to chime in on nodejs/build#419.

Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental
jasnell added a commit that referenced this pull request Oct 24, 2017
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: #15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Oct 24, 2017

Landed in 7f9eb4c with some lints fixed.

@jasnell jasnell closed this Oct 24, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: nodejs/node#15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: #15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: #15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@gibfahn gibfahn mentioned this pull request Oct 31, 2017
MylesBorins pushed a commit that referenced this pull request Oct 31, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    #16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    #16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    #16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    #16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    #15743

PR-URL: #16630
gibfahn added a commit that referenced this pull request Oct 31, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    #16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    #16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    #16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    #16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    #15743

PR-URL: #16630
gibfahn added a commit that referenced this pull request Oct 31, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    #16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    #16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    #16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    #16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    #15743

PR-URL: #16630
jasnell pushed a commit that referenced this pull request Oct 31, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    #16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    #16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    #16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    #16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    #15743

PR-URL: #16630
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    nodejs/node#16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    nodejs/node#16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    nodejs/node#16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    nodejs/node#16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    nodejs/node#15743

PR-URL: nodejs/node#16630
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    nodejs/node#16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    nodejs/node#16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    nodejs/node#16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    nodejs/node#16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    nodejs/node#15743

PR-URL: nodejs/node#16630
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: nodejs/node#15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
This LTS release comes with 87 commits. This includes 30 that are
updates to lib/ or src/, 20 that are test related, 13 that are doc
related, 19 which are build / tools related, and 4 commits which are
updates to dependencies.

Notable Changes:

* doc:
  - add Gibson Fahnestock to Release team (Gibson Fahnestock)
    nodejs/node#16620
* deps:
  - update npm to 5.5.1 (Myles Borins)
    nodejs/node#16509
* http2:
  - The exposed http2 socket is no longer manipulatable
    (Anatoli Papirovski)
    nodejs/node#16330
* module:
  - support custom paths to require.resolve() (cjihrig)
    nodejs/node#16397
* util:
  - util.TextEncoder and util.TextDecoder are no longer experimental.
    There will no longer be a warning when they are used
    (James M Snell)
    nodejs/node#15743

PR-URL: nodejs/node#16630
@gibfahn
Copy link
Member

gibfahn commented Jan 15, 2018

Release team were -1 on landing on v6.x, if you disagree let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet