-
Notifications
You must be signed in to change notification settings - Fork 684
Update deprecations for v5 #6496
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
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 5b06849416e2226f464d8cf9 |
@Deprecated("Use extensions() instead", ReplaceWith("extensions(mapOf(name to value))")) | ||
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v5_0_0) | ||
fun putExtension(name: String, value: Any?) = apply { |
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.
Deprecating this one and adding extensions(Map)
for consistency with our other builders.
@Deprecated("Unused. Use dependsOn() instead.") | ||
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0) | ||
fun metadataConfiguration() = "apolloMetadata" |
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.
This one was mostly an internal API. I'm not going through the ERROR
level
@Deprecated("Use toFlow() and handle ApolloResponse.exception instead") | ||
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0) | ||
fun toFlowV3(): Flow<ApolloResponse<D>> { |
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.
The V3 helpers are also not going through ERROR
because I think it's relatively clear that they were a temporary solution,
@ApolloDeprecatedSince(v4_0_0) | ||
@Deprecated("Use close", ReplaceWith("close()"), level = DeprecationLevel.ERROR) | ||
fun dispose() { | ||
} |
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.
This one is an interesting one because even though is is marked as ERROR
, nothing prevents users to actually implement the dispose()
function. All they would see is a warning that the override is not deprecated while the base method is.
Not sure if there is a good solution and I don't really want to keep this forever...
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.
Yeah it would be nice if implementing a fun deprecated with ERROR
level was an error?
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.
This is not how it works right now...
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.
🧹
@@ -33,7 +33,7 @@ annotation class ApolloDeprecatedSince(val version: Version) { | |||
v4_0_0, | |||
v4_0_1, | |||
v4_0_2, | |||
v4_1_2, | |||
v4_1_2, // All symbols above are ERRORs in 5.0.0 except a few ones that are perpetual soft deprecations like SubscriptionWsProtocol (https://youtrack.jetbrains.com/issue/KT-54106) |
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.
👍
@ApolloDeprecatedSince(v4_0_0) | ||
@Deprecated("Use close", ReplaceWith("close()"), level = DeprecationLevel.ERROR) | ||
fun dispose() { | ||
} |
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.
Yeah it would be nice if implementing a fun deprecated with ERROR
level was an error?
DeprecationLevel.WARNING
are turned intoDeprecationLevel.ERROR
SubscriptionWsProtocol
DeprecationLevel.ERROR
are removed