Skip to content

Fix the deprecation of String.init(validatingUTF8: [CChar]). #71186

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

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jan 26, 2024

This PR changes the deprecation annotation of String.init(validatingUTF8: [CChar]) to match that of String.init(validatingUTF8: UnsafePointer<CChar>). Both have been given new, undeprecated, renamed replacements (validatingCString:).

This regressed with #68423.

Resolves rdar://121674502.

This PR changes the deprecation annotation of `String.init(validatingUTF8: [CChar])` to match that of `String.init(validatingUTF8: UnsafePointer<CChar>)`. Both have been given new, undeprecated, renamed replacements (`validatingCString:`).

Resolves rdar://121674502.
@grynspan grynspan added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Jan 26, 2024
@grynspan grynspan requested review from xedin and glessard January 26, 2024 18:42
@grynspan grynspan self-assigned this Jan 26, 2024
@grynspan grynspan requested a review from a team as a code owner January 26, 2024 18:42
@grynspan
Copy link
Contributor Author

@swift-ci please test

@glessard
Copy link
Contributor

@swift-ci please build toolchain

@glessard
Copy link
Contributor

glessard commented Jan 27, 2024

Copy link
Contributor

@glessard glessard left a comment

Choose a reason for hiding this comment

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

This does indeed remove the deprecation warning introduced in #68423 when building swift-test

@glessard glessard merged commit 384a66a into main Jan 27, 2024
@glessard glessard deleted the jgrynspan/121674502-fix-deprecation-of-validatingUTF8-cchar-array-overload branch January 27, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants