Skip to content
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

[Experiment] Make OpaquePointer an alias for UnsafeRawPointer. #14051

Closed

Conversation

DougGregor
Copy link
Member

This is an experiment to see what the impact of changing OpaquePointer to UnsafeRawPointer would likely be. It's a simplification we'd like to do... depending on source impact.

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

Vapor and Perfect are both failing because we're trying to initialize an UnsafeMutablePointer from an OpaquePointer, but without acknowledging the mutating. The code would have to change to init(mutating:). I'm going to test an alternative that maintains mutation when importing pointers to incomplete types (so we use UnsafeRawPointer or UnsafeMutableRawPointer accordingly), and look for other mitigations.

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Make UnsafeMutableRawPointer's `init(_: UnsafeRawPointer)` deprecated
(rather than "unavailable"), to smooth over source-compatibility
issues with the change in OpaquePointer.
@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

DougGregor commented Jan 23, 2018

Only Vapor is failing, due to the code at https://github.com/vapor/sockets/blob/master/Sources/Sockets/Address/Address%2BC.swift#L67-L73.

That use of OpaquePointer seems unnecessary. Not totally sure why it was written that way.

@shahmishal
Copy link
Member

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

  • How to change the base branch: (Link)
  • More detail about the branch update: (Link)

@shahmishal shahmishal closed this Oct 5, 2020
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.

2 participants