Skip to content

Mirror .NET/runtime ICU version range in PowerShell - #26304

Merged
Dongbo Wang (daxian-dbw) merged 11 commits into
PowerShell:masterfrom
kasperk81:patch-1
Nov 17, 2025
Merged

Dongbo Wang (daxian-dbw) merged 11 commits into
PowerShell:masterfrom
kasperk81:patch-1

Conversation

@kasperk81

Copy link
Copy Markdown
Contributor

PR Summary

The .NET runtime defines ICU version ranges instead of tracking exact “running” versions.

This PR mirrors that approach in PowerShell: rather than hardcoding specific ICU versions, it provides headroom above the build version so Debian packages flow smoothly and remain compatible across a range of ICU versions.

Better fix for #25865.

PR Context

PR Checklist

Comment thread tools/packaging/packaging.psm1 Resolved
@iSazonov Ilya (iSazonov) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Oct 27, 2025
@iSazonov

Copy link
Copy Markdown
Collaborator

For discussion. Could we take these constants from this file automatically?

@kasperk81

Copy link
Copy Markdown
Contributor Author

For discussion. Could we take these constants from this file automatically?

I don't know how to parse C source in PowerShell. Manual parsing sounds like a bad idea. Also, U_ICU_VERSION_MAJOR_NUM is defined in libicu-dev header.

Comment thread tools/packaging/packaging.psm1 Resolved
@TravisEz13

Copy link
Copy Markdown
Member

For discussion. Could we take these constants from this file automatically?

I don't know how to parse C source in PowerShell. Manual parsing sounds like a bad idea. Also, U_ICU_VERSION_MAJOR_NUM is defined in libicu-dev header.

We should not assume what platform we are building on.

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
@kasperk81

Copy link
Copy Markdown
Contributor Author

We should not assume what platform we are building on.

Travis Plunk (@TravisEz13), this is agnostic of build platform? Or can you clarify what you meant?

@TravisEz13

Copy link
Copy Markdown
Member

We should not assume what platform we are building on.

Travis Plunk (@TravisEz13), this is agnostic of build platform? Or can you clarify what you meant?

We should be agnostic of build platform. So, if we do pull any information in, it needs to be from public .NET information.

@kasperk81

Copy link
Copy Markdown
Contributor Author

We should not assume what platform we are building on.

Travis Plunk (@TravisEz13) — is this agnostic of the build platform, or could you clarify what you meant?

We should be agnostic of the build platform. If we do pull any information in, it needs to come from public .NET information.

I’m happy with the current state of the PR, where we align with the version range used by the .NET runtime; which I believe you’re also okay with. The $BuildICUVersion can be updated once a year before each release. This implies the package remains compatible with up to 30 future ICU versions supported by the .NET runtime. Given ICU’s roughly biannual release cadence, that translates to about "15 years of compatibility with the latest libicu" for a given PowerShell version.

@TravisEz13

Copy link
Copy Markdown
Member

We should not assume what platform we are building on.

Travis Plunk (@TravisEz13) — is this agnostic of the build platform, or could you clarify what you meant?

We should be agnostic of the build platform. If we do pull any information in, it needs to come from public .NET information.

I’m happy with the current state of the PR, where we align with the version range used by the .NET runtime; which I believe you’re also okay with. The $BuildICUVersion can be updated once a year before each release. This implies the package remains compatible with up to 30 future ICU versions supported by the .NET runtime. Given ICU’s roughly biannual release cadence, that translates to about "15 years of compatibility with the latest libicu" for a given PowerShell version.

It would be wonderful if .NET exposed this and we could generate the code, but otherwise this seems like a step forward.
Maybe add comments on what the plan is to the script?

@TravisEz13

Copy link
Copy Markdown
Member

LGTM, but packaging has been undergoing some changes. CI is broken. I have a PR to fix it. We need to take that PR first and rerun tests.

#26315

Comment thread tools/packaging/packaging.psm1 Resolved
Comment thread tools/packaging/packaging.psm1 Resolved
@kasperk81

Copy link
Copy Markdown
Contributor Author

Travis Plunk (@TravisEz13), if it looks good, can this be merged? Will it be part of the upcoming release?

@TravisEz13

Copy link
Copy Markdown
Member

kasperk81 we have all the changes to the packaging commited that we expect. I'll run the CI again and verify.

@kasperk81

Copy link
Copy Markdown
Contributor Author

Travis Plunk (@TravisEz13) i've fixed the typo from suggestion #26304 (comment). can you rerun the CI?

@TravisEz13

Copy link
Copy Markdown
Member

Approved for backport

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 6, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 6, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 6, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 6, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Jonathan Brouwer (JonathanBrouwer) added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Oct 8, 2026
Rollup merge of #163849 - cuviper:pwsh-7.6.6, r=ubiratansoares

ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 10, 2026
ci: update to PowerShell 7.6.6

This resolves the ICU version issue, because they now support a wide
range: PowerShell/PowerShell#26304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.5.x-Done Backport-7.6.x-Done CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants