Skip to content

[release/v7.4] Mirror .NET/runtime ICU version range in PowerShell#27137

Closed
adityapatwardhan wants to merge 1 commit intoPowerShell:release/v7.4from
adityapatwardhan:backport/release/v7.4/26304-bb44aa1bc
Closed

[release/v7.4] Mirror .NET/runtime ICU version range in PowerShell#27137
adityapatwardhan wants to merge 1 commit intoPowerShell:release/v7.4from
adityapatwardhan:backport/release/v7.4/26304-bb44aa1bc

Conversation

@adityapatwardhan
Copy link
Copy Markdown
Member

Backport of #26304 to release/v7.4

Triggered by @adityapatwardhan on behalf of @kasperk81

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Updates the Get-PackageDependencies function to use a dynamic ICU version range instead of a hardcoded list. This change applies to deb package dependencies and provides forward compatibility for future ICU releases while maintaining compatibility down to ICU 60.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified that the dynamic ICU version range calculation works correctly with $BuildICUVersion=74 for v7.4, generating the expected version range from 60 to 104 for deb packages. This mirrors the .NET runtime approach for broader compatibility with different ICU versions.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

The change expands the acceptable ICU versions for deb packages from a fixed list to a dynamic range (60-104 for v7.4), which increases compatibility without breaking existing functionality. The .NET runtime uses the same approach, providing validation for this pattern.

@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 22:24
@adityapatwardhan adityapatwardhan requested a review from a team as a code owner April 1, 2026 22:24
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 1, 2026
@adityapatwardhan
Copy link
Copy Markdown
Member Author

Closing as the target branch is wrong

Copy link
Copy Markdown
Contributor

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.

Pull request overview

Backport to release/v7.4 updating Debian package dependency generation to mirror the .NET runtime’s ICU version range approach, replacing a hardcoded libicuXX alternative list with a computed range for improved forward compatibility.

Changes:

  • Add ICU version range constants (MinICUVersion, BuildICUVersion, MaxICUVersion) to drive dependency generation.
  • Replace the hardcoded Debian libicu alternative list with a dynamically generated libicu<max> | ... | libicu<min> string.
  • Minor formatting-only adjustment at end of file.

Comment on lines +2133 to +2138
# - The runtime supports ICU versions >= the version it was built against
# and <= that version + 30, to allow sufficient headroom for future releases.
# - ICU typically releases about twice per year, so +30 provides roughly
# 15 years of forward compatibility.
# - On some platforms, the minimum supported version may be lower
# than the build version and we know that older versions just works.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The rationale comment says “supports ICU versions >= the version it was built against and <= that version + 30”, but the implementation explicitly allows versions down to $MinICUVersion (60) which is lower than the build version (74). Please reword the comment to match the actual range being generated (MinICUVersion..(BuildICUVersion+30)) and the .NET runtime behavior described by the linked source.

Suggested change
# - The runtime supports ICU versions >= the version it was built against
# and <= that version + 30, to allow sufficient headroom for future releases.
# - ICU typically releases about twice per year, so +30 provides roughly
# 15 years of forward compatibility.
# - On some platforms, the minimum supported version may be lower
# than the build version and we know that older versions just works.
# - The effective supported ICU version range here is:
# MinICUVersion (runtime minimum) .. (BuildICUVersion + 30).
# - The upper bound follows the .NET runtime policy of supporting
# ICU versions up to the version it was built against plus 30,
# to allow sufficient headroom for future releases.
# - ICU typically releases about twice per year, so +30 provides roughly
# 15 years of forward compatibility beyond the build version.
# - The lower bound is set to the runtime's minimum supported ICU
# version, which may be lower than the build version on some
# platforms where we know older versions work.

Copilot uses AI. Check for mistakes.
# - ICU typically releases about twice per year, so +30 provides roughly
# 15 years of forward compatibility.
# - On some platforms, the minimum supported version may be lower
# than the build version and we know that older versions just works.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Grammar: “older versions just works” should be “older versions just work”.

Suggested change
# than the build version and we know that older versions just works.
# than the build version and we know that older versions just work.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants