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

deps: update ICU to 72.1 #45068

Merged
merged 4 commits into from Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/parallel/test-icu-env.js
Expand Up @@ -122,22 +122,22 @@ if (isMockable) {
assert.deepStrictEqual(
locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toLocaleString()')),
[
'7/25/1980, 1:35:33 AM',
'7/25/1980, 1:35:33AM',
Copy link
Member

Choose a reason for hiding this comment

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

I suspect this will break the sharedlib ICU builds which will be using the previous format?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what happened. Should I make two branches depending on the ICU version?

Copy link
Member

Choose a reason for hiding this comment

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

Yes. I think technically the tests could be branched on the cldr version but in practice the ICU version is probably sufficient? At least we don't/haven't updated cldr independently of ICU version bumps up until now.

cc @srl295

Copy link
Member

Choose a reason for hiding this comment

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

this is always the case if you link with a backlevel ICU. I assume sharedlib = local system icu?

Copy link
Member

Choose a reason for hiding this comment

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

cldr doesn't usually update separate from icu

Copy link
Member Author

Choose a reason for hiding this comment

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

The change makes sense to me within any semverity.

Which change? Given that you added the test, do you think we need to consider the ICU 72.1 update a semver-major change?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be skipped unless the icu, cldr, tz, and unicode versions all match.

Makes sense, but should we concern about user-provided deps in our tests? If the version is heavily mismatched with bundled one, it might lead to test failures in other places as well anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Which change?

The reviewed part, and the rest of changes in this file in this PR: https://github.com/nodejs/node/pull/45068/files#diff-a6095e09d738de6d1c78d336fac497210d041350d1ece89ef04491ff22bbf4b4L125-R135

Given that you added the test, do you think we need to consider the ICU 72.1 update a semver-major change?

No, the opposite: I consider changes in this file in this PR to be semver-patch, since it only slightly changes formatting in a few locales.

However, if the test would fail for a more serious reason (for example, adding a global cache for ICU that overrides environment variables even in freshly spawned process), I think it would be safer to not backport it.
The purpose of this test is to detect if something like that happens.

Copy link
Member

Choose a reason for hiding this comment

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

it might lead to test failures in other places as well anyway

That's an argument for not having such tests.

I'm trying to understand what the intent of testing is… is it to verify that ICU is integrated? Or that ICU's data never changes?

Because the data changes frequently. Some examples from the past few months: Sierra Leone revaluates its currency. Croatia switches to the Euro. Turkey is now Türkiye. Date formats change due to linguistic and geopolitical requests. Kazakhistan switches to Latin script. Etc…. the output here is not generally suitable for regression tests that are expected to pass in the future without modification.

Copy link
Member

Choose a reason for hiding this comment

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

CLDR 42 was released yesterday. here is the delta chart with some of the data changes. To give an idea of the magnitude of what changes from release to release.

'1980/7/25 01:35:33',
'25/7/1980, 1:35:33 am',
'25/7/1980, 1:35:33',
'25/07/1980 01:35:33',
'٢٥‏/٧‏/١٩٨٠, ١:٣٥:٣٣ ص',
'২৫/৭/১৯৮০ ১:৩৫:৩৩ AM',
'٢٥‏/٧‏/١٩٨٠، ١:٣٥:٣٣ ص',
'২৫/৭/১৯৮০, ১:৩৫:৩৩ AM',
'25.07.1980, 01:35:33',
'25/07/1980 01:35:33',
'25/7/1980 1:35:33 AM',
'25/7/1980 01.35.33',
'25/07/1980, 01:35:33',
'25/7/1980، 1:35:33 AM',
'25/7/1980, 01.35.33',
'25.7.1980, 01:35:33',
'1980/7/25 1:35:33',
'25/7/1980 01:35:33',
'२५/७/१९८०, १:३५:३३ AM',
'25/7/1980 1:35:33 AM',
'25/7/1980 1:35:33 AM'
]
);
assert.strictEqual(
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-intl.js
Expand Up @@ -97,7 +97,7 @@ if (!common.hasIntl) {
// Test format
{
const localeString = date0.toLocaleString(['en'], optsGMT);
assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM');
assert.strictEqual(localeString, '1/1/1970, 12:00:00AM');
}
// number format
{
Expand Down