-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
V8 icu patch 4.x #15562
V8 icu patch 4.x #15562
Conversation
ci: https://ci.nodejs.org/job/node-test-pull-request/10205/ it is worth mentioning some of the tests are failing in CI due to timeouts... I believe this is due to snapshots not having been re-enabled on 4.x ci 4.8.4 for comparison: https://ci.nodejs.org/job/node-test-commit/12533/ |
@nodejs/build are the errors we are seeing in V8 CI due to snapshots being turned off? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not making this clear, but all of the instances of %_Call
need to be changed to %_CallFunction
, as V8 bug 4413 was not merged into V8 4.5.
deps/v8/src/i18n.js
Outdated
* 'of', 'au' and 'es' are special-cased and lowercased. | ||
*/ | ||
function toTitleCaseTimezoneLocation(location) { | ||
var match = %_Call(StringMatch, location, GetTimezoneNameLocationPartRE()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var match = %_CallFunction(location, GetTimezoneNameLocationPartRE(), StringMatch);
deps/v8/src/i18n.js
Outdated
// The first character is a separator, '_' or '-'. | ||
// None of IANA zone names has both '_' and '-'. | ||
var separator = %_Call(StringSubstring, match[2], 0, 1); | ||
var parts = %_Call(StringSplit, match[2], separator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var separator = %_CallFunction(match[2], 0, 1, StringSubstring);
var parts = %_CallFunction(match[2], separator, StringSplit);
deps/v8/src/i18n.js
Outdated
result = result + '_' + toTitleCaseWord(match[i]); | ||
i++; | ||
if (!IS_UNDEFINED(match[3]) && 3 < match.length) { | ||
var locations = %_Call(StringSplit, match[3], '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var locations = %_CallFunction(match[3], '/', StringSplit);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubber stamp lgtm
0eed431
to
de847b7
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/10270/ /cc @nodejs/lts @nodejs/v8 @bnoordhuis |
deps/v8/src/i18n.js
Outdated
* 'of', 'au' and 'es' are special-cased and lowercased. | ||
*/ | ||
function toTitleCaseTimezoneLocation(location) { | ||
var match = %_CallFunction(StringMatch, location, GetTimezoneNameLocationPartRE()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%_CallFunction()
takes the receiver as its first argument and the function as its last argument, everything in between are function arguments. I.e., this should read:
var match = %_CallFunction(location, GetTimezoneNameLocationPartRE(), StringMatch);
(Which is > 80 columns, by the way.)
deps/v8/src/i18n.js
Outdated
if (!IS_UNDEFINED(match[2]) && 2 < match.length) { | ||
// The first character is a separator, '_' or '-'. | ||
// None of IANA zone names has both '_' and '-'. | ||
var separator = %_CallFunction(StringSubstring, match[2], 0, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, this should read:
var separator = %_CallFunction(match[2], 0, 1, StringSubstring);
I'll stop pointing it out from here on.
de847b7
to
9158d6c
Compare
good catch @bnoordhuis. fixed ci: https://ci.nodejs.org/job/node-test-pull-request/10288/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but apparently the v4.x branch doesn't build on the V8 buildbots... the only reason the rhel72s-s390x buildbot is green is because it skips the build entirely.
* 'of', 'au' and 'es' are special-cased and lowercased. | ||
*/ | ||
function toTitleCaseTimezoneLocation(location) { | ||
var match = %_CallFunction(location, GetTimezoneNameLocationPartRE(), StringMatch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting that this is over 80 columns. I can live with that, though.
Here's a run on v4.8.4 to confirm that ci is just not working https://ci.nodejs.org/job/node-test-commit-v8-linux/933/ If that is the case I will attempt to run the tests manually edit: confirmed 4.x V8 ci is broken. |
I cannot get
This appears to be broken in v4.8.4 as well, testing v4.8.3 rn edit: confirm that this fails in v4.8.3 as well /cc @nodejs/v8 |
Maybe because that version of V8 requires some old version of GCC? |
@MylesBorins Untested, but I speculate the google-clang (or whatever you call it) that diff --git a/Makefile b/Makefile
index d917056b11..93356930af 100644
--- a/Makefile
+++ b/Makefile
@@ -191,7 +191,8 @@ endif
v8:
tools/make-v8.sh
- $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
+ $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) \
+ $(V8_BUILD_OPTIONS) GYPFLAGS="-Dclang=0"
ifeq ($(NODE_TARGET_TYPE),static_library)
test: all (Note: diff with tabs.) |
Getting a failure with that patch as well
edit: found a patch to V8 that may fix that |
Ah, I think that is a bug in |
I've got another branch I've put together that attempts to fix this, testing before force pushing over this PR https://github.com/MylesBorins/node/tree/V8-icu-patch-4.x-too I saw failures on both linux + osx when manually testing, will edit this comment with the errors once I have a chance to re-run the tests osx failures appear to be a git problem... ignoreing this one for now to focus on the linux issue
|
Linux error on new branch
edit: looks like this patch will fix it v8/v8@e28183b |
It works 🎉 I'm not sure how I feel about introducing ci: https://ci.nodejs.org/job/node-test-pull-request/10610/ edit edit 2: |
Makefile
Outdated
v8: | ||
tools/make-v8.sh | ||
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) | ||
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) \ | ||
$(V8_BUILD_OPTIONS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you undo this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Original commit message: Allow ICU to normalize time zones There's at least one case of a time zone alias: Asia/Kathmandu aliases Asia/Katmandu. ICU seems to normalize to the (deprecated) latter choice. V8 internationalization choked on this change; this patch interprets ICU's output more precisely and allows it. BUG=chromium:487322 R=jungshik,adamk LOG=Y Review URL: https://codereview.chromium.org/1509273007 Cr-Commit-Position: refs/heads/master@{nodejs#32769} PR-URL: nodejs#15562
Original commit message: Timezone name check fix 1. Location names with more than one underscores (e.g. Ho_Chi_Minh) didn't work because of the way capturing works with repeated patterns in RE. It's now supported by changing the RE to capture the whole string and splitting on '_' in the next step. 2. Adds support for location names with a hyphen 3. Adds support for timezone ids with three parts (e.g. American/Argentina/Buenos_Aires) 4. Adds special handling of 'au', 'es' and 'of' in zone ids. They need to be kept in lowercase. (see the full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) 5. Adds regression tests for all the above and make the existing tests more robust against future ICU changes. ICU canonicalizes zone names to deprecated names, but it may change. ( http://bugs.icu-project.org/trac/ticket/12044 ) BUG=364374 LOG=Y Review URL: https://codereview.chromium.org/1529363005 Cr-Commit-Position: refs/heads/master@{nodejs#33097} PR-URL: nodejs#15562
b99e874
to
0cc8102
Compare
@@ -110,6 +110,7 @@ check: test | |||
cctest: all | |||
@out/$(BUILDTYPE)/$@ | |||
|
|||
v8: export GYPFLAGS += -Dclang=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I want explicit sign off on... is it ok to use export here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, seems fine.
I'm not sure what the clang=0 has to do with things… but if it works, shrug I didn't get to compare what other build files had changed in the intervening time. (busy trying to get ICU 60 out the door, etc etc).
Yes, that's because of choices v8 has made with how it builds ICU. However, when Node builds v8, v8's ICU is out of the picture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection…
The v8 and test-hash-seed targets cannot be run in parallel because they need different copies of the deps/v8 directory. Ref: #14004 (comment) Backport-PR-URL: #15562 PR-URL: #14219 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Original commit message: Fix compilation with GCC 5.2 Fixes: ../../test/cctest/compiler/test-js-typed-lowering.cc:224:14: error: ‘kJSTypes’ defined but not used [-Werror=unused-variable] static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), ../../src/bignum.cc: In member function ‘void v8::internal::Bignum::AssignDecimalString(Vector<const char>)’: ../../src/bignum.cc:80:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] ../../src/compiler/ia32/code-generator-ia32.cc:1366:3: required from here ../../src/base/logging.h:123:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] DEFINE_CHECK_OP_IMPL(EQ, ==) BUG= Review URL: https://codereview.chromium.org/1371823002 Cr-Commit-Position: refs/heads/master@{#31095} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: GYP: Don't pass -Wno-format-pedantic to GCC. This flag is not understood correctly by GCC and breaks the GCC ARM and MIPS optdebug builds. Patch from Brendan Kirby <brendan.kirby@imgtec.com> BUG= Review URL: https://codereview.chromium.org/1369273003 Cr-Commit-Position: refs/heads/master@{#31013} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Allow ICU to normalize time zones There's at least one case of a time zone alias: Asia/Kathmandu aliases Asia/Katmandu. ICU seems to normalize to the (deprecated) latter choice. V8 internationalization choked on this change; this patch interprets ICU's output more precisely and allows it. BUG=chromium:487322 R=jungshik,adamk LOG=Y Review URL: https://codereview.chromium.org/1509273007 Cr-Commit-Position: refs/heads/master@{#32769} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Timezone name check fix 1. Location names with more than one underscores (e.g. Ho_Chi_Minh) didn't work because of the way capturing works with repeated patterns in RE. It's now supported by changing the RE to capture the whole string and splitting on '_' in the next step. 2. Adds support for location names with a hyphen 3. Adds support for timezone ids with three parts (e.g. American/Argentina/Buenos_Aires) 4. Adds special handling of 'au', 'es' and 'of' in zone ids. They need to be kept in lowercase. (see the full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) 5. Adds regression tests for all the above and make the existing tests more robust against future ICU changes. ICU canonicalizes zone names to deprecated names, but it may change. ( http://bugs.icu-project.org/trac/ticket/12044 ) BUG=364374 LOG=Y Review URL: https://codereview.chromium.org/1529363005 Cr-Commit-Position: refs/heads/master@{#33097} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
landed in fc6145f...4e44b64 |
The v8 and test-hash-seed targets cannot be run in parallel because they need different copies of the deps/v8 directory. Ref: #14004 (comment) Backport-PR-URL: #15562 PR-URL: #14219 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Original commit message: Fix compilation with GCC 5.2 Fixes: ../../test/cctest/compiler/test-js-typed-lowering.cc:224:14: error: ‘kJSTypes’ defined but not used [-Werror=unused-variable] static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), ../../src/bignum.cc: In member function ‘void v8::internal::Bignum::AssignDecimalString(Vector<const char>)’: ../../src/bignum.cc:80:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] ../../src/compiler/ia32/code-generator-ia32.cc:1366:3: required from here ../../src/base/logging.h:123:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] DEFINE_CHECK_OP_IMPL(EQ, ==) BUG= Review URL: https://codereview.chromium.org/1371823002 Cr-Commit-Position: refs/heads/master@{#31095} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: GYP: Don't pass -Wno-format-pedantic to GCC. This flag is not understood correctly by GCC and breaks the GCC ARM and MIPS optdebug builds. Patch from Brendan Kirby <brendan.kirby@imgtec.com> BUG= Review URL: https://codereview.chromium.org/1369273003 Cr-Commit-Position: refs/heads/master@{#31013} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Allow ICU to normalize time zones There's at least one case of a time zone alias: Asia/Kathmandu aliases Asia/Katmandu. ICU seems to normalize to the (deprecated) latter choice. V8 internationalization choked on this change; this patch interprets ICU's output more precisely and allows it. BUG=chromium:487322 R=jungshik,adamk LOG=Y Review URL: https://codereview.chromium.org/1509273007 Cr-Commit-Position: refs/heads/master@{#32769} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Timezone name check fix 1. Location names with more than one underscores (e.g. Ho_Chi_Minh) didn't work because of the way capturing works with repeated patterns in RE. It's now supported by changing the RE to capture the whole string and splitting on '_' in the next step. 2. Adds support for location names with a hyphen 3. Adds support for timezone ids with three parts (e.g. American/Argentina/Buenos_Aires) 4. Adds special handling of 'au', 'es' and 'of' in zone ids. They need to be kept in lowercase. (see the full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) 5. Adds regression tests for all the above and make the existing tests more robust against future ICU changes. ICU canonicalizes zone names to deprecated names, but it may change. ( http://bugs.icu-project.org/trac/ticket/12044 ) BUG=364374 LOG=Y Review URL: https://codereview.chromium.org/1529363005 Cr-Commit-Position: refs/heads/master@{#33097} PR-URL: #15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Fix compilation with GCC 5.2 Fixes: ../../test/cctest/compiler/test-js-typed-lowering.cc:224:14: error: ‘kJSTypes’ defined but not used [-Werror=unused-variable] static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), ../../src/bignum.cc: In member function ‘void v8::internal::Bignum::AssignDecimalString(Vector<const char>)’: ../../src/bignum.cc:80:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] ../../src/compiler/ia32/code-generator-ia32.cc:1366:3: required from here ../../src/base/logging.h:123:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] DEFINE_CHECK_OP_IMPL(EQ, ==) BUG= Review URL: https://codereview.chromium.org/1371823002 Cr-Commit-Position: refs/heads/master@{#31095} PR-URL: nodejs/node#15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: GYP: Don't pass -Wno-format-pedantic to GCC. This flag is not understood correctly by GCC and breaks the GCC ARM and MIPS optdebug builds. Patch from Brendan Kirby <brendan.kirby@imgtec.com> BUG= Review URL: https://codereview.chromium.org/1369273003 Cr-Commit-Position: refs/heads/master@{#31013} PR-URL: nodejs/node#15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Allow ICU to normalize time zones There's at least one case of a time zone alias: Asia/Kathmandu aliases Asia/Katmandu. ICU seems to normalize to the (deprecated) latter choice. V8 internationalization choked on this change; this patch interprets ICU's output more precisely and allows it. BUG=chromium:487322 R=jungshik,adamk LOG=Y Review URL: https://codereview.chromium.org/1509273007 Cr-Commit-Position: refs/heads/master@{#32769} PR-URL: nodejs/node#15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Original commit message: Timezone name check fix 1. Location names with more than one underscores (e.g. Ho_Chi_Minh) didn't work because of the way capturing works with repeated patterns in RE. It's now supported by changing the RE to capture the whole string and splitting on '_' in the next step. 2. Adds support for location names with a hyphen 3. Adds support for timezone ids with three parts (e.g. American/Argentina/Buenos_Aires) 4. Adds special handling of 'au', 'es' and 'of' in zone ids. They need to be kept in lowercase. (see the full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) 5. Adds regression tests for all the above and make the existing tests more robust against future ICU changes. ICU canonicalizes zone names to deprecated names, but it may change. ( http://bugs.icu-project.org/trac/ticket/12044 ) BUG=364374 LOG=Y Review URL: https://codereview.chromium.org/1529363005 Cr-Commit-Position: refs/heads/master@{#33097} PR-URL: nodejs/node#15562 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Requested in #15507 (comment)
/cc @bnoordhuis
Refs: #13022