Skip to content

Conversation

martinbonnin
Copy link
Contributor

  • DeprecationLevel.WARNING are turned into DeprecationLevel.ERROR
    • Except for a couple perpetual soft deprecations such as SubscriptionWsProtocol
  • DeprecationLevel.ERROR are removed
  • Galaxy and RxJava support artifacts are removed

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Apr 29, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 5b06849416e2226f464d8cf9

Comment on lines +55 to 57
@Deprecated("Use extensions() instead", ReplaceWith("extensions(mapOf(name to value))"))
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v5_0_0)
fun putExtension(name: String, value: Any?) = apply {
Copy link
Contributor Author

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.

Comment on lines -34 to -36
@Deprecated("Unused. Use dependsOn() instead.")
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
fun metadataConfiguration() = "apolloMetadata"
Copy link
Contributor Author

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

Comment on lines -156 to -158
@Deprecated("Use toFlow() and handle ApolloResponse.exception instead")
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
fun toFlowV3(): Flow<ApolloResponse<D>> {
Copy link
Contributor Author

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,

Comment on lines -30 to -33
@ApolloDeprecatedSince(v4_0_0)
@Deprecated("Use close", ReplaceWith("close()"), level = DeprecationLevel.ERROR)
fun dispose() {
}
Copy link
Contributor Author

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...

Copy link
Contributor

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?

Copy link
Contributor Author

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...

@martinbonnin martinbonnin marked this pull request as ready for review April 29, 2025 16:45
@martinbonnin martinbonnin requested a review from BoD as a code owner April 29, 2025 16:45
@martinbonnin martinbonnin mentioned this pull request Apr 29, 2025
5 tasks
Copy link
Contributor

@BoD BoD left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines -30 to -33
@ApolloDeprecatedSince(v4_0_0)
@Deprecated("Use close", ReplaceWith("close()"), level = DeprecationLevel.ERROR)
fun dispose() {
}
Copy link
Contributor

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?

@martinbonnin martinbonnin merged commit 4b6dbc6 into main Apr 29, 2025
8 checks passed
@martinbonnin martinbonnin deleted the update-deprecations branch April 29, 2025 18:23
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.

3 participants