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: port ICU ClangCL fix #54448

Closed
wants to merge 1 commit into from
Closed

Conversation

StefanStojanovic
Copy link
Contributor

This is a change I landed in the ICU at unicode-org/icu#3023. It is needed to enable ClangCL compilation for Node.js on Windows and that's why I'm porting it manually now before the next ICU update. After this PR lands, I'll open a follow-up one changing the icu-generic.gyp to take advantage of the ICU changes.

cc @targos @nodejs/platform-windows

@StefanStojanovic StefanStojanovic added windows Issues and PRs related to the Windows platform. dependencies Pull requests that update a dependency file. labels Aug 19, 2024
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Aug 19, 2024
@StefanStojanovic StefanStojanovic added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RedYetiDev RedYetiDev added the icu Issues and PRs related to the ICU dependency. label Aug 19, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM on green CI.

@nodejs-github-bot
Copy link
Collaborator

@StefanStojanovic StefanStojanovic added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 21, 2024
@StefanStojanovic
Copy link
Contributor Author

This isn't how we patch ICU. See https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-icu.md#floating-patches-to-icu and https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-icu.md#why-not-just-modify-the-icu-source-directly

I wasn't aware of this... Thanks (almost landed it, but luckily didn't), I'll adapt my changes to be according to the practice described.

@StefanStojanovic
Copy link
Contributor Author

@richardlau regarding your previous comment on how ICU patches should be landed I have a proposal:

TLDR - I'd like to land it like this as doing it as you suggested is not straightforward

In more detail, I did what you suggested in my other PR. It also required changes in configure.py and icu-generic.gyp, but it doesn't compile on SmartOS because of a linking error (all other platforms pass). I assume that changes in the configuration phase are responsible for this as this patch covers folders never before used in an ICU patch. On the other hand, ICU patching hasn't been used in a very long time so I do not think investing time into making the patching better is worth it in the end. Also, my changes in the ICU are planned for v76.1, and that is the next major release. One more thing I'd like to add is that this is blocking us from moving forward with the ClangCL enablement process and V8 after v12.8, the version we are at currently, will no longer support MSVC. WIth all this taken into consideration, I'd like to ask to land this PR.

@targos
Copy link
Member

targos commented Aug 26, 2024

Maybe we should just wait for ICU 76 to be released? @srl295 Do you know if it's going to happen soon?

@srl295
Copy link
Member

srl295 commented Aug 26, 2024

Maybe we should just wait for ICU 76 to be released? @srl295 Do you know if it's going to happen soon?

The public page with the schedule is here, plan is October.

TLDR - I'd like to land it like this as doing it as you suggested is not straightforward

-1 from me on this, but let's keep talking.

In more detail, I did what you suggested in my #54502

I've been out so missed this, but I'll take a look.

It also required changes in configure.py and icu-generic.gyp, but it doesn't compile on SmartOS because of a linking error (all other platforms pass).

OK, let's take a look.

I assume that changes in the configuration phase are responsible for this as this patch covers folders never before used in an ICU patch.

Possibly.

On the other hand, ICU patching hasn't been used in a very long time so I do not think investing time into making the patching better is worth it in the end.

Strong disagree.

As I thought I noted elsewhere, people rebuild Node from their own modified copy of ICU. ICU may release a dot version. The patching machinery means that your changes don't get replaced by users in that situation.

Also, my changes in the ICU are planned for v76.1, and that is the next major release.

Yes, it'll be GA in a couple months (see link above). So waiting for that could be a way forward as well if you prefer.

One more thing I'd like to add is that this is blocking us from moving forward with the ClangCL enablement process and V8 after v12.8, the version we are at currently, will no longer support MSVC. WIth all this taken into consideration, I'd like to ask to land this PR.

I will review the other PR first.

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

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

(for the record) deps/icu-small should not be modified. Please close this PR in favor of #54502

@StefanStojanovic
Copy link
Contributor Author

Closing this one since the other PR landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file. icu Issues and PRs related to the ICU dependency. needs-ci PRs that need a full CI run. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants