-
Notifications
You must be signed in to change notification settings - Fork 730
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
WebSocket Fixes - Revert to Starscream 3.x and invert dependency #1861
Conversation
@designatednerd Do you know if there are any changes to the docs that need to happen for this before we cut a new release? Want to cut a release probably tomorrow, so I'd like to get that squared away. |
"revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", | ||
"version": "0.9.0" | ||
"revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", | ||
"version": "0.9.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally don't think we should be pulling other dependency updates into focused PRs. If we ever wanted to revert this PR it ends up affecting other things too. I'm not requiring a change, will approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the notes: we have made a private forked of Starscream
- I think that should probably be we have made a fork of Starscream
, since the fork isn't actually private.
@@ -3807,7 +3812,7 @@ | |||
repositoryURL = "https://github.com/daltoniam/Starscream.git"; | |||
requirement = { | |||
kind = upToNextMinorVersion; | |||
minimumVersion = 4.0.4; | |||
minimumVersion = 3.1.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's some kind of reference to the main Starscream repo floating around in here
isa = XCSwiftPackageProductDependency; | ||
package = DE8C84F2268BBF8000C54D02 /* XCRemoteSwiftPackageReference "Starscream" */; | ||
productName = Starscream; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also not clear on why this has been added like three times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear on that either... XCProject files still have some weird bugs with their SPM integrations sometimes. I'm not too worried about it though. Not sure if there is anything we can do to fix that...
Is there any plan to remove the actual Starscream dependency being declared in the main Apollo Package.swift? Currently even though we don't use the ApolloWebsocket target, SPM/Xcode will clone the Starscream dependency (due to https://github.com/apple/swift-evolution/blob/main/proposals/0226-package-manager-target-based-dep-resolution.md not being fully implemented). This means that we are still prevented from using Starscream 4.x (or really any version except for the Apollo forked 3.1.2 version). |
I will fix this tomorrow. |
So l'm starting to look into this. Moving the Starscream dependency into another target (out of |
* main: (856 commits) Add execution tests for ApolloClient clearCache callback queue (apollographql#1901) Use the provided callback queue instead of the store's default. (apollographql#1904) chore(deps): update dependency path-parse to 1.0.7 [security] (apollographql#1899) Release - 0.46.0 (apollographql#1897) Update subscriptions tutorial to be compatible with recent changes (apollographql#1893) Add docs and improve merging of records from WebSockets into cache. (apollographql#1892) Publish response from the `WebSocketTransport` to the `ApolloStore` (apollographql#1889) fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.14 Removing Swift codegen (v1) (apollographql#1873) Update toolchain versions used by circleci (apollographql#1875) fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.13 Community Updates - ROADMAP/README (apollographql#1867) [Release] - 0.45.0 (apollographql#1862) WebSocket Fixes - Revert to Starscream 3.x and invert dependency (apollographql#1861) Docs/discussions_2_community branch changes (apollographql#1858) Replace spectrum with Discourse (apollographql#1857) fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.12 Configure Renovate (apollographql#1854) Revert "Reconfiguring renovate 2/2" Reconfiguring renovate 2/2 ... # Conflicts: # Sources/Apollo/GraphQLQueryWatcher.swift # Sources/ApolloWebSocket/WebSocketTransport.swift
Changelog Additions
In preparation for moving to Apple WebSockets in the future, we have also fully inverted the dependency on Starscream. Between these two changes, a lot of breaking changes to our Web Socket API have been made:
ApolloWebSocketClient
protocol was removed and replaced withWebSocketClient
.WebSocketClient
does not rely directly on Starscream anymore and has been streamlined for easier conformance.ApolloWebSocket
, the default implementation of theWebSocketClient
has been replaced withDefaultWebSocket
. This implementation uses Starscream, but implementations using other websocket libraries can now be created and used with no need for Starscream.WebSocketClientDelegate
replaces direct dependency onStarscream.WebSocketDelegate
for delegates.