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

Comment the equals() and hashCode() methods in GeneratedConnector and GeneratedConnector #5970

Merged
merged 1 commit into from
May 15, 2024

Conversation

dconeybe
Copy link
Contributor

From b/340910059: In order to document the behavior of the equals() and hashCode() methods of the generated classes, these methods were added to the GeneratedConnector and GeneratedOperation interfaces in the Android Core SDK; however, adding these methods is a breaking change that requires the implementing classes to explicitly define them, rather than inheriting the (correct) default behavior from kotlin.Any. Since the released codegen does not explicitly define these methods it fails to compile. However, once the codegen that does define those methods is sufficiently soaked, they should be uncommented.

… GeneratedConnector

From b/340910059: In order to document the behavior of the equals() and hashCode() methods of the generated classes, these methods were added to the GeneratedConnector and GeneratedOperation interfaces in the Android Core SDK; however, adding these methods is a breaking change that requires the implementing classes to explicitly define them, rather than inheriting the (correct) default behavior from kotlin.Any. Since the released codegen does not explicitly define these methods it fails to compile. However, once the codegen that does define those methods is sufficiently soaked, they should be uncommented.
@dconeybe dconeybe self-assigned this May 15, 2024
@dconeybe dconeybe merged commit f9b5dd9 into dataconnect May 15, 2024
6 of 10 checks passed
@dconeybe dconeybe deleted the dconeybe/CommentEquals branch May 15, 2024 18:59
@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

dconeybe added a commit that referenced this pull request May 15, 2024
…Connector and GeneratedConnector (#5970)

From b/340910059: In order to document the behavior of the equals() and
hashCode() methods of the generated classes, these methods were added to
the GeneratedConnector and GeneratedOperation interfaces in the Android
Core SDK; however, adding these methods is a breaking change that
requires the implementing classes to explicitly define them, rather than
inheriting the (correct) default behavior from kotlin.Any. Since the
released codegen does not explicitly define these methods it fails to
compile. However, once the codegen that does define those methods is
sufficiently soaked, they should be uncommented.
@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

No changes between base commit (35bf5c4) and merge commit (fa91bc8).

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/2YaA7dplQF.html

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-dataconnect:
error: Removed class com.google.firebase.dataconnect.BaseRef [RemovedClass]
error: Added class com.google.firebase.dataconnect.ConnectorConfig [AddedClass]
error: Added constructor com.google.firebase.dataconnect.DataConnectException(String,Throwable) [AddedMethod]
error: Removed class com.google.firebase.dataconnect.DataConnectGrpcClientKt [RemovedClass]
error: Added class com.google.firebase.dataconnect.DataConnectSettings [AddedClass]
error: Added class com.google.firebase.dataconnect.DataConnectSettingsKt [AddedClass]
error: Class com.google.firebase.dataconnect.FirebaseDataConnect changed class/interface declaration [ChangedClass]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.equals(Object) [AddedAbstractMethod]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.getConfig() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.getLocation() [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.getMutations() [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.getQueries() [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.getService() [RemovedMethod]
error: Method com.google.firebase.dataconnect.FirebaseDataConnect.getSettings has changed return type from com.google.firebase.dataconnect.FirebaseDataConnectSettings to com.google.firebase.dataconnect.DataConnectSettings [ChangedType]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.hashCode() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.mutation(String,String,String,com.google.firebase.dataconnect.BaseRef.Codec<VariablesType,ResultType>) [RemovedMethod]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.mutation(String,Variables,kotlinx.serialization.DeserializationStrategy<? extends Data>,kotlinx.serialization.SerializationStrategy<? super Variables>) [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.query(String,String,String,com.google.firebase.dataconnect.BaseRef.Codec<VariablesType,ResultType>) [RemovedMethod]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.query(String,Variables,kotlinx.serialization.DeserializationStrategy<? extends Data>,kotlinx.serialization.SerializationStrategy<? super Variables>) [AddedAbstractMethod]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.toString() [AddedAbstractMethod]
error: Added method com.google.firebase.dataconnect.FirebaseDataConnect.useEmulator(String,int) [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.Companion.getInstance(String,String,com.google.firebase.dataconnect.FirebaseDataConnectSettings) [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.Companion.getInstance(String,String,kotlin.jvm.functions.Function1<? super com.google.firebase.dataconnect.FirebaseDataConnectSettings.Builder,kotlin.Unit>) [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.Companion.getInstance(com.google.firebase.FirebaseApp,String,String,com.google.firebase.dataconnect.FirebaseDataConnectSettings) [RemovedMethod]
error: Removed method com.google.firebase.dataconnect.FirebaseDataConnect.Companion.getInstance(com.google.firebase.FirebaseApp,String,String,kotlin.jvm.functions.Function1<? super com.google.firebase.dataconnect.FirebaseDataConnectSettings.Builder,kotlin.Unit>) [RemovedMethod]
error: Removed class com.google.firebase.dataconnect.FirebaseDataConnect.Mutations [RemovedClass]
error: Removed class com.google.firebase.dataconnect.FirebaseDataConnect.Queries [RemovedClass]
error: Added class com.google.firebase.dataconnect.FirebaseDataConnectKt [AddedClass]
error: Removed class com.google.firebase.dataconnect.FirebaseDataConnectSettings [RemovedClass]
error: Removed class com.google.firebase.dataconnect.GraphQLException [RemovedClass]
error: Removed enum constant com.google.firebase.dataconnect.LogLevel.INFO [RemovedField]
error: Added enum constant com.google.firebase.dataconnect.LogLevel.NONE [AddedField]
error: Added enum constant com.google.firebase.dataconnect.LogLevel.WARN [AddedField]
error: Removed enum constant com.google.firebase.dataconnect.LogLevel.WARNING [RemovedField]
error: Removed class com.google.firebase.dataconnect.LoggerKt [RemovedClass]
error: Class com.google.firebase.dataconnect.MutationRef changed class/interface declaration [ChangedClass]
error: Added method com.google.firebase.dataconnect.MutationRef.execute(kotlin.coroutines.Continuation<? super com.google.firebase.dataconnect.MutationResult<Data,Variables>>) [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.MutationRef.execute(VariablesType,kotlin.coroutines.Continuation<? super ResultType>) [RemovedMethod]
error: Removed class com.google.firebase.dataconnect.NetworkTransportException [RemovedClass]
error: Class com.google.firebase.dataconnect.QueryRef changed class/interface declaration [ChangedClass]
error: Added method com.google.firebase.dataconnect.QueryRef.execute(kotlin.coroutines.Continuation<? super com.google.firebase.dataconnect.QueryResult<Data,Variables>>) [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.QueryRef.execute(VariablesType,kotlin.coroutines.Continuation<? super ResultType>) [RemovedMethod]
error: Added method com.google.firebase.dataconnect.QueryRef.subscribe() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.QueryRef.subscribe(VariablesType) [RemovedMethod]
error: Class com.google.firebase.dataconnect.QuerySubscription changed class/interface declaration [ChangedClass]
error: Added method com.google.firebase.dataconnect.QuerySubscription.equals(Object) [AddedAbstractMethod]
error: Method com.google.firebase.dataconnect.QuerySubscription.getFlow has changed return type from kotlinx.coroutines.flow.Flow<com.google.firebase.dataconnect.QuerySubscription.Message<VariablesType,ResultType>> to kotlinx.coroutines.flow.Flow<com.google.firebase.dataconnect.QuerySubscriptionResult<Data,Variables>> [ChangedType]
error: Removed method com.google.firebase.dataconnect.QuerySubscription.getLastResult() [RemovedMethod]
error: Added method com.google.firebase.dataconnect.QuerySubscription.getQuery() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.QuerySubscription.getVariables() [RemovedMethod]
error: Added method com.google.firebase.dataconnect.QuerySubscription.hashCode() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.QuerySubscription.reload() [RemovedMethod]
error: Added method com.google.firebase.dataconnect.QuerySubscription.toString() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.QuerySubscription.update(VariablesType) [RemovedMethod]
error: Removed class com.google.firebase.dataconnect.QuerySubscription.Message [RemovedClass]
error: Removed class com.google.firebase.dataconnect.QuerySubscriptionKt [RemovedClass]
error: Removed class com.google.firebase.dataconnect.ResultDecodeException [RemovedClass]
error: Removed package com.google.firebase.dataconnect.apiproposal [RemovedPackage]
error: Removed class com.google.firebase.dataconnect.generated.CreatePostMutation [RemovedClass]
error: Removed class com.google.firebase.dataconnect.generated.CreatePostMutationKt [RemovedClass]
error: Removed class com.google.firebase.dataconnect.generated.GetPostQuery [RemovedClass]
error: Removed class com.google.firebase.dataconnect.generated.GetPostQueryKt [RemovedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@firebase firebase locked and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants