vapor / websocket-kit

WebSocket client library built on SwiftNIO
https://docs.vapor.codes/4.0/advanced/websockets/
MIT License
272 stars 79 forks source link

Update for new NIOSSL #132

Closed gwynne closed 1 year ago

gwynne commented 1 year ago

Fix for SwiftNIOSSL 2.23.1 breaking the build of the WebSocket tests due to EVP_PKEY no longer being visible.

Shoutout and thanks to @jhoughjr for reporting the problem!

Additional changes:

codecov-commenter commented 1 year ago

Codecov Report

Merging #132 (f594b5f) into main (e0faccd) will increase coverage by 16.34%. The diff coverage is 91.07%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #132 +/- ## =========================================== + Coverage 71.15% 87.50% +16.34% =========================================== Files 5 6 +1 Lines 475 624 +149 =========================================== + Hits 338 546 +208 + Misses 137 78 -59 ``` | [Impacted Files](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [...bSocketKit/Concurrency/WebSocket+Concurrency.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvQ29uY3VycmVuY3kvV2ViU29ja2V0K0NvbmN1cnJlbmN5LnN3aWZ0) | `73.52% <ø> (ø)` | | | [...urces/WebSocketKit/HTTPUpgradeRequestHandler.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvSFRUUFVwZ3JhZGVSZXF1ZXN0SGFuZGxlci5zd2lmdA==) | `71.92% <72.72%> (ø)` | | | [Sources/WebSocketKit/WebSocket.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvV2ViU29ja2V0LnN3aWZ0) | `88.61% <81.48%> (+16.82%)` | :arrow_up: | | [Sources/WebSocketKit/WebSocketHandler.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvV2ViU29ja2V0SGFuZGxlci5zd2lmdA==) | `78.57% <86.95%> (+23.25%)` | :arrow_up: | | [Sources/WebSocketKit/WebSocketClient.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvV2ViU29ja2V0Q2xpZW50LnN3aWZ0) | `95.29% <95.68%> (+27.33%)` | :arrow_up: | | [Sources/WebSocketKit/WebSocket+Connect.swift](https://app.codecov.io/gh/vapor/websocket-kit/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9XZWJTb2NrZXRLaXQvV2ViU29ja2V0K0Nvbm5lY3Quc3dpZnQ=) | `98.59% <97.22%> (+1.09%)` | :arrow_up: |
VaporBot commented 1 year ago

These changes are now available in 2.9.0

tierracero commented 1 year ago

why are you doing breaking changes without declaring a new major version? Minor versions should not have foundational changes these should have had come in version 3.x.x

Reference to captured var 'client' in concurrently-executing code is being derived from:

ws.onPing { [weak self] _ in guard let client = client else { return } // Reference to captured var 'client' in concurrently-executing code self?.logger.debug("[⚡️] 🏓 ping (client.id)") self?._on(ping: client) self?.on(ping: client) }

with all due respect to your great work but async/await should have been added on next version not on minor. forgive me if im mis understating the change.

gwynne commented 1 year ago

The issue you're encountering was due to PR #131, which has since been reverted.

0xTim commented 1 year ago

@tierracero the changes weren't supposed to be breaking. I checked the newest release with the AwesomeWS library and it compiles fine. Be warned though, the reason why the compiler flagged that as an error and not a warning is because the code is unsafe and will crash if you receive WS data at the same time the setup runs

tierracero commented 1 year ago

@0xTim thank you very much have an awesome blessed day :)