FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix building without ICU by TimothyGu · Pull Request #14489 · nodejs/node · GitHub

/ node Public

Fix building without ICU - #14489

Closed
TimothyGu wants to merge 3 commits into
nodejs:masterfrom
TimothyGu:encoding-no-icu
Closed

Fix building without ICU#14489
TimothyGu wants to merge 3 commits into
nodejs:masterfrom
TimothyGu:encoding-no-icu

Conversation

Copy link
Copy Markdown
Member

Corresponding documentation changes for encoding will be folded into #14486.

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

encoding, test

TimothyGu added encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. test Issues and PRs related to the tests. labels Jul 26, 2017

jasnell commented Jul 27, 2017

Copy link
Copy Markdown
Member

Argh... we seriously need to get building without ICU enabled by default as part of the normal CI run.

bnoordhuis previously approved these changes Jul 28, 2017

bnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Only lightly reviewed, mostly rubber-stamp.

@jasnell That's nodejs/build#419.

Copy link
Copy Markdown
Member Author

@jasnell I assume your comment was a LGTM?

TimothyGu force-pushed the encoding-no-icu branch 4 times, most recently from 626437c to 67493e8 Compare July 30, 2017 11:04

Copy link
Copy Markdown
Member Author

I modified this PR to offer a TextDecoder with reduced functionalities even when built without ICU. @jasnell @bnoordhuis please review.

CI: https://ci.nodejs.org/job/node-test-pull-request/9407/

addaleax added the i18n-api Issues and PRs related to the i18n implementation. label Jul 30, 2017
Comment thread doc/api/util.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

s/options/option

Comment thread test/parallel/test-readline-position.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This change does not look related?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is necessary to fix building (and testing) on ICU, since the JS implementation can only distinguish between wide/narrow.

jasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code change looks good, tho I'd prefer a bit less code duplication on the two TextDecoder variants.

refack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good.
I've hit that "ICU missing" wall several times... good riddance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Don't you want to assert anything about the output string? Or at least wrap in assert.doesNotThrow just to be explicit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Wrapped in doesNotThrow. We don't really care about the inspection results as long as it works 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you add the Type of the expected Error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Same comments as in test-whatwg-encoding-textencoder.js#L24 & L28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You could use a simple string, should be semantically the same as an anchored RegExp.

Comment thread lib/internal/errors.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you add a test asserting the expected message, to test/parallel/test-internal-errors.js, as per the new tweaks in https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md#testing-new-errors

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for the reminder, I realized that I also forgot to add the new error code to the docs...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Actually, the test file only contains more complicated error code processing, like ERR_INVALID_ARG_TYPE. I'll still add the missing docs though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The reasoning was "test the message once then assume it's ok everywhere else" but, this will probably get reworked anyway after we finish migrating all the Error, so this is non-blocking.

TimothyGu commented Aug 2, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

@jasnell Changed so that there's less duplication.

Tried to kick off a CI w/o ICU: https://ci.nodejs.org/job/node-test-commit/11502/ https://ci.nodejs.org/job/node-test-commit/11503/

TimothyGu commented Aug 2, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

After the V8 6.0 update, the V8 console is now installed on the global object regardless of whether inspector is actually enabled, and in the case of no-ICU inspector is always disabled, which leads to the test failures :(

Pushed one more fix to address this situation.

New no ICU CI: https://ci.nodejs.org/job/node-test-commit/11505/

TimothyGu added the inspector Issues and PRs related to the V8 inspector protocol label Aug 2, 2017

Copy link
Copy Markdown
Member Author

Landed in 34d1b11...17547c4.

TimothyGu closed this Aug 5, 2017
TimothyGu deleted the encoding-no-icu branch August 5, 2017 08:41
TimothyGu added a commit that referenced this pull request Aug 5, 2017
PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
TimothyGu added a commit that referenced this pull request Aug 5, 2017
Also split up the tests.

PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
TimothyGu added a commit that referenced this pull request Aug 5, 2017
PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax pushed a commit that referenced this pull request Aug 7, 2017
PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax pushed a commit that referenced this pull request Aug 7, 2017
PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

Copy link
Copy Markdown
Member

This doesn’t land cleanly on 8.x; if you can, please follow the guide and raise a backport PR.

fornwall added a commit to termux/termux-packages that referenced this pull request Aug 11, 2017
Note that the resulting package does not work yet due to
 nodejs/node#14489
not being in 8.3.0.
TimothyGu added a commit to TimothyGu/node that referenced this pull request Aug 12, 2017
Also split up the tests.

PR-URL: nodejs#14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

Copy link
Copy Markdown
Member Author

@addaleax Done: #14786. Only the second commit needs backporting, as the first and third commits have been backported already.

addaleax pushed a commit that referenced this pull request Aug 12, 2017
Also split up the tests.

Backport-PR-URL: #14786
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>

PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax mentioned this pull request Aug 13, 2017

Copy link
Copy Markdown
Contributor

Is this needed on v6.x?

Copy link
Copy Markdown
Contributor

ping. this would need to be manually backported

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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. i18n-api Issues and PRs related to the i18n implementation. inspector Issues and PRs related to the V8 inspector protocol test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL