Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump the minimum ICU version to 60 #112713

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

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

jkoritzinsky
Copy link
Member

As ICU approaches version 80, we need to consider what to do about our ICU version ranges. Our system currently supports a min version of 50 and a max of "min + 30", so 80.

ICU60 is the version that shipped with Ubuntu 18.04, which is the distro that we base our libc version on. For Alpine, the version of ICU in the distro we base our libc on (3.17) ships with ICU 72.

I recommend that we bump our min to ICU60, which will by our current rules bump our max to ICU90, which will give us more runway.

I'd recommend holding off on merging this until #112671 is merged, as that PR changes our deps packages to better describe scenarios where we actually ship packages today.

As ICU approaches version 80, we need to consider what to do about our ICU version ranges. Our system currently supports a min version of 50 and a max of "min + 30", so 80.

ICU60 is the version that shipped with Ubuntu 18.04, which is the distro that we base our libc version on. For Alpine, the version of ICU in the distro we base our libc on (3.17) ships with ICU 72.

I recommend that we bump our min to ICU60, which will by our current rules bump our max to ICU90, which will give us more runway.

I'd recommend holding off on merging this until dotnet#112671 is merged, as that PR changes our deps packages to better describe scenarios where we actually ship packages today.
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (6)
  • src/native/libs/System.Globalization.Native/config.h.in: Language not supported
  • src/native/libs/System.Globalization.Native/configure.cmake: Language not supported
  • src/native/libs/System.Globalization.Native/pal_collation.c: Language not supported
  • src/native/libs/System.Globalization.Native/pal_icushim.c: Language not supported
  • src/native/libs/System.Globalization.Native/pal_icushim_internal.h: Language not supported
  • src/native/libs/System.Globalization.Native/pal_timeZoneInfo.c: Language not supported

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@tarekgh
Copy link
Member

tarekgh commented Feb 19, 2025

@jkoritzinsky did we check all Linux systems which .NET support are using ICU v60 and up? I am asking because we usually get some unexpected systems like Centos distros which runs with older versions of ICU. I don't have the full list to tell. @richlander may know more here?

Did we consider changing only the max number instead? I am not opposing the change more than want to feel comfortable we'll not breaking any supported system.

@jkoritzinsky
Copy link
Member Author

@tarekgh, looking at https://pkgs.org/search/?q=libicu, I see that for the min version of each distro that we or our partners support we have at least ICU60 available. RHEL8 is the only one with only ICU60, all other RHEL-based distros are further ahead. OpenSUSE and SUSE Enterprise Linux install ICU73 by default.

The original version of Windows that shipped with ICU has the APIs from ICU60, so we should be good there too.

@tarekgh
Copy link
Member

tarekgh commented Feb 19, 2025

I did quick research using copilot and I am getting the following list. Can we assume we are not supporting any of these systems?

1. Ubuntu:

Ubuntu 16.04 LTS (Xenial Xerus): Shipped with ICU version 55.1.

2. Debian:

Debian 8 (Jessie): Featured ICU version 52.1.
Debian 7 (Wheezy): Came with ICU version 48.1.
The Debian Packages repository provides more insights into specific package versions.

3. Fedora:

Fedora 23: Included ICU version 55.1.
Fedora 20: Shipped with ICU version 50.1.2.
For historical package data, consult the Fedora Packages database.

4. openSUSE:

openSUSE Leap 42.3: Featured ICU version 52.1.
openSUSE 13.2: Came with ICU version 53.1.

5. CentOS 7 & Red Hat Enterprise Linux 7:

ICU Version: 50.1.2

@tarekgh tarekgh requested a review from janvorli February 19, 2025 22:25
@tarekgh
Copy link
Member

tarekgh commented Feb 19, 2025

Here is the Windows versions that support older ICU versions. I am not sure if we need to care about it. Windows servers use ICU versions 61+ though.

Windows Desktop Version Codename Build Number Marking Name ICU Version ICU CLDR Version NLS CLDR Version
1703 RS2 15063 Creators Update 57.1 CLDR 29 CLDR 30.0.2
1709 RS3 16299 Fall Creators Update 59.1 CLDR 31.0.1 CLDR 31.0.1
1803 RS4 17134 April 2018 Update 59.1 CLDR 31.0.1 CLDR 32.0.1

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jkoritzinsky
Copy link
Member Author

jkoritzinsky commented Feb 19, 2025

I did quick research using copilot and I am getting the following list. Can we assume we are not supporting any of these systems?

1. Ubuntu:

Ubuntu 16.04 LTS (Xenial Xerus): Shipped with ICU version 55.1.

2. Debian:

Debian 8 (Jessie): Featured ICU version 52.1.
Debian 7 (Wheezy): Came with ICU version 48.1.
The Debian Packages repository provides more insights into specific package versions.

3. Fedora:

Fedora 23: Included ICU version 55.1.
Fedora 20: Shipped with ICU version 50.1.2.
For historical package data, consult the Fedora Packages database.

4. openSUSE:

openSUSE Leap 42.3: Featured ICU version 52.1.
openSUSE 13.2: Came with ICU version 53.1.

5. CentOS 7 & Red Hat Enterprise Linux 7:

ICU Version: 50.1.2

All of these versions are either out of support or not supported by .NET.

Here is the Windows versions that support older ICU versions. I am not sure if we need to care about it. Windows servers use ICU versions 61+ though.

Windows Desktop Version Codename Build Number Marking Name ICU Version ICU CLDR Version NLS CLDR Version
1703 RS2 15063 Creators Update 57.1 CLDR 29 CLDR 30.0.2
1709 RS3 16299 Fall Creators Update 59.1 CLDR 31.0.1 CLDR 31.0.1
1803 RS4 17134 April 2018 Update 59.1 CLDR 31.0.1 CLDR 32.0.1

The minimum version of Windows 10 that we support that supports ICU is 1809 RS5, which has at least ICU 60. We also support 1607 RS1, but that doesn't have ICU. We don't support RS2-4 any more for .NET 10 based on the matrix I shared above.

@richlander
Copy link
Member

Thanks for doing this. The approach looks sound.

@richlander
Copy link
Member

richlander commented Feb 20, 2025

It feels like we need a peer doc to the OS-onboarding one which is a "stuff we do every release" doc. The ICU topic would go in that. Is that something we can start together? It can be super barren at first.

Sven's work with our build container images would be a natural fit. Same with the "managed code" image I created.

@sbomer @jkoritzinsky

@akoeplinger
Copy link
Member

We could also pick a larger number than +30, e.g. looks like on Android we already use MaxICUVersion 255.
It should only matter for the failure case where we don't find a suitable ICU version.

@tarekgh
Copy link
Member

tarekgh commented Feb 20, 2025

We could also pick a larger number than +30, e.g. looks like on Android we already use MaxICUVersion 255.
It should only matter for the failure case where we don't find a suitable ICU version.

We try loading the ICU library starting from the max and decrement till we find the match. Increasing the max with a much bigger number can have some perf cost.

CC @janvorli

@janvorli
Copy link
Member

Right, it would likely add to the startup time which is not what we want.

@akoeplinger
Copy link
Member

ah yeah, I forgot about that. we could still flip that around though, e.g. right now with latest ICU 76 we'd try 16 times vs. 14 times with the 90 ceiling. the benefit is that it'd not suddenly break, just get a bit slower over time.

@janvorli
Copy link
Member

The point of going backwards was to ensure that we load the latest one if multiple ones are present on the system. Due to its versioning mechanism, it is possible to have multiple versions installed on the same distro IIRC.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants