Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[iOS][globalization] Fix IndexOf on empty strings on iOS to return -1#111898

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@matouskozak
Copy link
Member

@matouskozakmatouskozak commentedJan 28, 2025
edited
Loading

Fix incorrect return condition and add test case forIndexOf("", <something>) and"".Contains(<something>).

Clean-up of some styling issues and adding comments.


This PR should fix:

and needs to be backported to .NET 9

@dotnet-policy-service
Copy link
Contributor

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

@matouskozak
Copy link
MemberAuthor

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@matouskozak
Copy link
MemberAuthor

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

}

/**
* Removes zero-width and other weightless characters such as U+200B (Zero Width Space),
Copy link
Member

Choose a reason for hiding this comment

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

  • Removes zero-width and other weightless characters such as U+200B (Zero Width Space),

just in case if this need to change later, it will be good to look at the full list of ignorable charactershttps://www.unicode.org/charts/collation/chart_Ignored.html

matouskozak reacted with thumbs up emoji
@matouskozak
Copy link
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@vitek-karasvitek-karas left a comment

Choose a reason for hiding this comment

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

Looks reasonable - but I don't understand the code that well.

@matouskozakmatouskozak merged commit4e01649 intodotnet:mainJan 30, 2025
218 of 221 checks passed
@matouskozak
Copy link
MemberAuthor

/backport to release/9.0-staging

@github-actions
Copy link
Contributor

Started backporting torelease/9.0-staging:https://github.com/dotnet/runtime/actions/runs/13057341292

@github-actions
Copy link
Contributor

@matouskozak backporting to "release/9.0-staging" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patchApplying: Fix IndexOf on empty strings on iOS toreturn -1.git/rebase-apply/patch:80: trailing whitespace.* Removes zero-width and other weightless characters such as U+200B (Zero Width Space), .git/rebase-apply/patch:81: trailing whitespace.* U+200C (Zero Width Non-Joiner), U+200D (Zero Width Joiner), U+FEFF (Zero Width No-Break Space), warning: 2 lines add whitespace errors.Using index info to reconstruct a base tree...Msrc/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.IndexOf.csMsrc/libraries/System.Runtime/tests/System.Runtime.Tests/System/StringTests.csFalling back to patching base and 3-way merge...Auto-merging src/libraries/System.Runtime/tests/System.Runtime.Tests/System/StringTests.csAuto-merging src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.IndexOf.csCONFLICT (content): Merge conflictin src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.IndexOf.cserror: Failed to mergein the changes.hint: Use'git am --show-current-patch=diff' to see the failed patchhint: When you have resolved this problem, run"git am --continue".hint: If you prefer to skip this patch, run"git am --skip" instead.hint: To restore the original branch and stop patching, run"git am --abort".hint: Disable this message with"git config set advice.mergeConflict false"Patch failed at 0001 Fix IndexOf on empty strings on iOS toreturn -1Error: The process'/usr/bin/git' failed withexit code 128

Please backport manually!

grendello added a commit to grendello/runtime that referenced this pull requestJan 30, 2025
* main: (31 commits)  More native AOT Pri-1 test tree bring up (dotnet#111994)  Fix BigInteger outerloop test (dotnet#111841)  JIT: Run 3-opt once across all regions (dotnet#111989)  JIT: Check for profile consistency throughout JIT backend (dotnet#111684)  [JIT] Add legacy extended EVEX encoding and EVEX.ND/NF feature to x64 emitter backend (dotnet#108796)  [iOS][globalization] Fix IndexOf on empty strings on iOS to return -1 (dotnet#111898)  System.Speech: Use intellisense xml from dotnet-api-docs (dotnet#111983)  [mono][mini] Disable inlining if we encounter class initialization failure (dotnet#111754)  [main] Update dependencies from dotnet/roslyn (dotnet#111946)  Update dependencies fromhttps://github.com/dotnet/arcade build 20250129.2 (dotnet#111996)  Try changing the ICustomQueryInterface implementation to always return NotHandled instead of Failed to defer back to the ComWrappers impl. (dotnet#111978)  Combined dependency update (dotnet#111852)  Replace OPTIMIZE_FOR_SIZE with feature switch (dotnet#111743)  Fix failed assertion 'FPbased == FPbased2' (dotnet#111787)  Add remark to `ConditionalSelect` (dotnet#111945)  JIT: fix try region cloning when try is nested in a handler (dotnet#111975)  Use IRootFunctions in Tensor.StdDev (dotnet#110641)  Remove zlib dependencies from Docker containers (dotnet#111939)  Avoid `Unsafe.As` for `Memory<T>` and `ReadOnlyMemory<T>` conversion (dotnet#111023)  Cleanup membarrier portability (dotnet#111943)  ...
@JeroenBer
Copy link

@matouskozak
Will this fix be in 9.0.3 ?

@tarekgh
Copy link
Member

tarekgh commentedFeb 15, 2025
edited
Loading

This doesn’t seem to have made the cutoff for .NET servicing 9.0.3, so it will most likely be included in the 9.0.4 release in April.

matouskozak reacted with thumbs up emoji

@JeroenBer
Copy link

Where can I track that ? I don't see any 9.0.3 cutoff ?
9.0.2 was just released.

@matouskozak
Copy link
MemberAuthor

Where can I track that ? I don't see any 9.0.3 cutoff ? 9.0.2 was just released.

The cutoff for servicing X usually happens around the time the servicing X-1 is released.

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 20, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@steveisoksteveisoksteveisok approved these changes

@vitek-karasvitek-karasvitek-karas approved these changes

@tarekghtarekghtarekgh approved these changes

@akoeplingerakoeplingerAwaiting requested review from akoeplinger

@ilonatommyilonatommyAwaiting requested review from ilonatommy

@ivanpovazanivanpovazanAwaiting requested review from ivanpovazan

Assignees

@matouskozakmatouskozak

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@matouskozak@JeroenBer@tarekgh@steveisok@vitek-karas

[8]ページ先頭

©2009-2025 Movatter.jp