-
Notifications
You must be signed in to change notification settings - Fork 168
Remove Native classes from Public API #555
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
Merged
nbransby
merged 2 commits into
GitLiveApp:master
from
splendo:feature/make-native-classes-interna
Jun 27, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ public final class dev/gitlive/firebase/database/DataSnapshot { | |
public final class dev/gitlive/firebase/database/DatabaseReference : dev/gitlive/firebase/database/Query { | ||
public final fun child (Ljava/lang/String;)Ldev/gitlive/firebase/database/DatabaseReference; | ||
public final fun getKey ()Ljava/lang/String; | ||
public final fun getNativeReference ()Ldev/gitlive/firebase/database/NativeDatabaseReference; | ||
public final fun onDisconnect ()Ldev/gitlive/firebase/database/OnDisconnect; | ||
public final fun push ()Ldev/gitlive/firebase/database/DatabaseReference; | ||
public final fun removeValue (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
|
@@ -47,9 +46,11 @@ public final class dev/gitlive/firebase/database/DatabaseReference : dev/gitlive | |
public final fun setValue (Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun setValue (Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun setValue$default (Ldev/gitlive/firebase/database/DatabaseReference;Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public final fun setValueEncoded (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun updateChildren (Ljava/util/Map;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun updateChildren (Ljava/util/Map;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun updateChildren$default (Ldev/gitlive/firebase/database/DatabaseReference;Ljava/util/Map;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public final fun updateEncodedChildren (Ldev/gitlive/firebase/internal/EncodedObject;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
||
public final class dev/gitlive/firebase/database/FirebaseDatabase { | ||
|
@@ -68,41 +69,17 @@ public final class dev/gitlive/firebase/database/FirebaseDatabase { | |
public final class dev/gitlive/firebase/database/FirebaseDatabase$Companion { | ||
} | ||
|
||
public final class dev/gitlive/firebase/database/NativeDatabaseReference { | ||
public final fun child (Ljava/lang/String;)Ldev/gitlive/firebase/database/NativeDatabaseReference; | ||
public fun getAndroid ()Lcom/google/firebase/database/DatabaseReference; | ||
public synthetic fun getAndroid ()Lcom/google/firebase/database/Query; | ||
public final fun getDatabase ()Ldev/gitlive/firebase/database/FirebaseDatabase; | ||
public final fun getKey ()Ljava/lang/String; | ||
public final fun onDisconnect ()Ldev/gitlive/firebase/database/NativeOnDisconnect; | ||
public final fun push ()Ldev/gitlive/firebase/database/NativeDatabaseReference; | ||
public final fun removeValue (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun runTransaction (Lkotlinx/serialization/KSerializer;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun runTransaction$default (Ldev/gitlive/firebase/database/NativeDatabaseReference;Lkotlinx/serialization/KSerializer;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public final fun setValueEncoded (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun updateEncodedChildren (Ldev/gitlive/firebase/internal/EncodedObject;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
||
public final class dev/gitlive/firebase/database/NativeOnDisconnect { | ||
public final fun cancel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun getAndroid ()Lcom/google/firebase/database/OnDisconnect; | ||
public final fun getDatabase ()Ldev/gitlive/firebase/database/FirebaseDatabase; | ||
public final fun getPersistenceEnabled ()Z | ||
public final fun removeValue (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun setValue (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun updateEncodedChildren (Ldev/gitlive/firebase/internal/EncodedObject;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
||
public final class dev/gitlive/firebase/database/OnDisconnect { | ||
public final fun cancel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun getNative ()Ldev/gitlive/firebase/database/NativeOnDisconnect; | ||
public final fun removeValue (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun setEncodedValue (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun setValue (Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun setValue (Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun setValue$default (Ldev/gitlive/firebase/database/OnDisconnect;Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public final fun updateChildren (Ljava/util/Map;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public final fun updateChildren (Ljava/util/Map;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun updateChildren$default (Ldev/gitlive/firebase/database/OnDisconnect;Ljava/util/Map;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public final fun updateEncodedChildren (Ldev/gitlive/firebase/internal/EncodedObject;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why have these been added? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #555 (comment) |
||
} | ||
|
||
public class dev/gitlive/firebase/database/Query { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why have these been added?
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.
Because we have a bunch of inline methods that need access to the Native classes. Though those had been set as internal and annotated with @PublishedApi, this results in them still poping up in the API specification.
So it's essentially choosing between having the Native... classes in the api or these methods. I want for these because it makes the API "smaller"
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.
To clarify: these methods are also marked as
@PublishedApi internal fun
and the access the native classes inside their code. As a result the Native classes no longer need to be Published, but the method does because public inline methods can only call publish/Published code