Skip to content

Adopt typed throws in one withUnsafePointer() API #70971

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

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

kubamracek
Copy link
Contributor

No description provided.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM!

@inlinable
public func withUnsafePointer<T, E, Result>(

/// ABI: Historical withUnsafePointer(to:_:) rethrows, expressed as "throws",
Copy link
Member

Choose a reason for hiding this comment

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

Should this be in a #if !$Embedded block, since there is no ABI to maintain?

Copy link
Contributor

@stephentyrone stephentyrone Jan 18, 2024

Choose a reason for hiding this comment

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

I wonder if we shouldn't put all these legacy untyped-throws implementations in a file that we can simply not build for non-ABI or new platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll leave this is it is in this PR, if you're okay with that, but yes, we want to decide how to organize the legacy implementations. I don't feel strongly about this, but let me just note that there is no impact for Embedded Swift even if we keep the legacy impl in -- unused functions do not contribute to binary outputs.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

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.

4 participants