Skip to content

Conversation

@tarekgh
Copy link
Member

@tarekgh tarekgh commented May 4, 2022

Fixes #68814

The ICU API ucol_safeClone has been deprecated in version 71 and it is recommended to use the newly introduced API ucol_clone. This means when building our runtime using ICU 71 headers, it will cause a build break because it will recognize using deprecated API ucol_safeClone.
The fix here is we'll try to probe to see if ucol_clone is defined and use it (means using ICU 71). If ucol_clone is not defined, we'll fallback to use the old, deprecated API ucol_safeClone (means using ICU version less than 71). We do this probe either dynamically or statically linking to ICU libraries.

@ghost ghost assigned tarekgh May 4, 2022
@ghost
Copy link

ghost commented May 4, 2022

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

Issue Details

Fixes #68814

The ICU API ucol_safeClone has been deprecated in version 71 and it is recommended to use the newly introduced API ucol_clone. This means when building our runtime using ICU 71 headers, it will cause a build break because it will recognize using deprecated API ucol_safeClone.
The fix here is we'll try to probe to see if ucol_clone is defined and use it (means using ICU 71). If ucol_clone is not defined, we'll fallback to use the old, deprecated API ucol_safeClone (means using ICU version less than 71). We do this probe either dynamically or statically linking to ICU libraries.

Author: tarekgh
Assignees: -
Labels:

area-System.Globalization

Milestone: -

@tarekgh
Copy link
Member Author

tarekgh commented May 4, 2022

CC @ManickaP @danmoseley @janvorli

@tarekgh tarekgh added this to the 7.0.0 milestone May 4, 2022
@ManickaP
Copy link
Member

ManickaP commented May 4, 2022

I tested this locally and it works for me, thanks!

@tarekgh
Copy link
Member Author

tarekgh commented May 4, 2022

@janvorli could you please help have a quick look at this one?

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!

@tarekgh tarekgh force-pushed the EnableICUColClone branch from 75746c0 to bdba2ed Compare May 5, 2022 00:18
@tarekgh
Copy link
Member Author

tarekgh commented May 5, 2022

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tarekgh tarekgh added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 5, 2022
@tarekgh tarekgh removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 6, 2022
@tarekgh
Copy link
Member Author

tarekgh commented May 6, 2022

The failures in this PR are unrelated and tracked.

@tarekgh tarekgh merged commit 18d8935 into dotnet:main May 6, 2022
@tarekgh tarekgh deleted the EnableICUColClone branch May 6, 2022 16:43
@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2022
@lewing
Copy link
Member

lewing commented Sep 8, 2022

/backport to release/6.0

@carlossanlop
Copy link
Contributor

@lewing is the bot down?

@carlossanlop
Copy link
Contributor

@carlossanlop
Copy link
Contributor

/backport to release/6.0

@carlossanlop
Copy link
Contributor

My attempt threw an error: https://github.com/dotnet/runtime/actions/runs/3018860664

[backport](https://github.com/dotnet/runtime/runs/8260481022?check_suite_focus=true#step:3:18)
Unhandled error: HttpError: Unable to create comment because issue is locked.

I am not sure what that means. Does the issue this PR is fixing have to be open for a backport to work?

@dotnet dotnet unlocked this conversation Sep 8, 2022
@carlossanlop
Copy link
Contributor

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

@carlossanlop backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Deprecate ICU ucol_safeClone and support ucol_clone
Using index info to reconstruct a base tree...
A	src/native/libs/System.Globalization.Native/configure.cmake
A	src/native/libs/System.Globalization.Native/pal_collation.c
A	src/native/libs/System.Globalization.Native/pal_icushim.c
A	src/native/libs/System.Globalization.Native/pal_icushim_internal.h
A	src/native/libs/System.Globalization.Native/pal_icushim_internal_android.h
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h
CONFLICT (content): Merge conflict in src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h
Auto-merging src/libraries/Native/Unix/System.Globalization.Native/pal_icushim.c
CONFLICT (content): Merge conflict in src/libraries/Native/Unix/System.Globalization.Native/pal_icushim.c
Auto-merging src/libraries/Native/Unix/System.Globalization.Native/pal_collation.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Deprecate ICU ucol_safeClone and support ucol_clone
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

steveisok pushed a commit to lewing/runtime that referenced this pull request Sep 12, 2022
ayakael added a commit to ayakael/runtime that referenced this pull request Sep 13, 2022
carlossanlop pushed a commit that referenced this pull request Sep 13, 2022
* Bump the macOS image to one that isn't EOL yet

* Backport #68847 and #58485

Co-authored-by: Steve Pfister <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2022
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.

ucol_safeClone deprecated in ICU 71.1

5 participants