Skip to content

fix: ConfineIcuVersions is now respected by library discovery (#136)#222

Merged
imnasnainaec merged 5 commits into
masterfrom
worktree-agent-af0c3ca262870a8dd
Jun 8, 2026
Merged

fix: ConfineIcuVersions is now respected by library discovery (#136)#222
imnasnainaec merged 5 commits into
masterfrom
worktree-agent-af0c3ca262870a8dd

Conversation

@imnasnainaec

@imnasnainaec imnasnainaec commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • CheckDirectoryForIcuBinaries now filters ICU library candidates to the range set by Wrapper.ConfineIcuVersions before selecting the highest version.
  • Same filter applied in NativeMethodsHelper.GetIcuVersionInfoForNetCoreOrWindows.

Test plan

  • Place two ICU versions in the output directory (e.g. ICU 54 and ICU 59)
  • Call Wrapper.ConfineIcuVersions(54, 54) and verify the correct version is loaded

Closes #136

🤖 Generated with Claude Code


Devin review: https://app.devin.ai/review/sillsdev/icu-dotnet/pull/222

`CheckDirectoryForIcuBinaries` previously sorted candidates descending
and unconditionally took the first entry, ignoring `MinIcuVersion` and
`MaxIcuVersion`. It now iterates the sorted candidates and selects the
first whose parsed version falls within [MinIcuVersion, MaxIcuVersion].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Test Results

       8 files  ±0     648 suites  ±0   7s ⏱️ ±0s
   436 tests ±0     432 ✔️ ±0      4 💤 ±0  0 ±0 
3 576 runs  ±0  3 366 ✔️ ±0  210 💤 ±0  0 ±0 

Results for commit 34b53c9. ± Comparison against base commit 77def56.

♻️ This comment has been updated with latest results.

imnasnainaec and others added 2 commits June 2, 2026 15:59
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…inaries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imnasnainaec imnasnainaec self-assigned this Jun 2, 2026
Eliminates duplicated platform-dispatch logic in CheckDirectoryForIcuBinaries
and fixes the sort to use numeric descending order, consistent with
NativeMethodsHelper.TryGetIcuVersionNumber.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imnasnainaec imnasnainaec marked this pull request as ready for review June 3, 2026 16:26
@imnasnainaec imnasnainaec requested a review from ermshiperete June 4, 2026 20:58
@imnasnainaec imnasnainaec merged commit 293cca1 into master Jun 8, 2026
7 checks passed
@imnasnainaec imnasnainaec deleted the worktree-agent-af0c3ca262870a8dd branch June 8, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NativeMethodHelpers.GetIcuVersionInfoForNetCoreOrWindows doesn't confine version

2 participants