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

Remove passthrough register method from FirebaseSessions since `F… #5452

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

jrothfeder
Copy link
Contributor

…irebaseSessionsDependencies` can be accessed directly.

…irebaseSessionsDependencies` can be accessed directly.
@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-sessions:
error: Removed method com.google.firebase.sessions.FirebaseSessions.register(com.google.firebase.sessions.api.SessionSubscriber) [RemovedMethod]

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

Unit Test Results

     934 files  +   853       934 suites  +853   40m 59s ⏱️ + 38m 0s
  5 092 tests +4 053    5 071 ✔️ +4 033  21 💤 +21  0  - 1 
10 269 runs  +9 166  10 227 ✔️ +9 125  42 💤 +42  0  - 1 

Results for commit 4f06c9d. ± Comparison against base commit 859cb0c.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 19, 2023

Size Report 1

Affected Products

  • base

    TypeBase (859cb0c)Merge (f76c53e)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?8.66 kB? (?)
  • firebase-abt

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?13.9 kB? (?)
    apk (aggressive)?116 kB? (?)
    apk (release)?1.27 MB? (?)
  • firebase-annotations

    TypeBase (859cb0c)Merge (f76c53e)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?9.47 kB? (?)
  • firebase-appcheck

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?40.9 kB? (?)
    apk (aggressive)?370 kB? (?)
    apk (release)?1.94 MB? (?)
  • firebase-appcheck-debug

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?11.3 kB? (?)
    apk (aggressive)?372 kB? (?)
    apk (release)?1.95 MB? (?)
  • firebase-appcheck-debug-testing

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?7.40 kB? (?)
    apk (aggressive)?390 kB? (?)
    apk (release)?2.02 MB? (?)
  • firebase-appcheck-interop

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.10 kB? (?)
    apk (aggressive)?312 kB? (?)
    apk (release)?931 kB? (?)
  • firebase-appcheck-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.49 kB? (?)
    apk (aggressive)?371 kB? (?)
    apk (release)?1.94 MB? (?)
  • firebase-appcheck-playintegrity

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?11.1 kB? (?)
    apk (aggressive)?374 kB? (?)
    apk (release)?1.96 MB? (?)
  • firebase-appcheck-safetynet

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?10.5 kB? (?)
    apk (aggressive)?373 kB? (?)
    apk (release)?1.96 MB? (?)
  • firebase-appdistribution

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?251 kB? (?)
    apk (aggressive)?907 kB? (?)
    apk (release)?2.66 MB? (?)
  • firebase-appdistribution-api

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?20.3 kB? (?)
    apk (aggressive)?125 kB? (?)
    apk (release)?1.65 MB? (?)
  • firebase-appdistribution-api-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.12 kB? (?)
    apk (aggressive)?125 kB? (?)
    apk (release)?1.65 MB? (?)
  • firebase-common

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?96.0 kB? (?)
    apk (aggressive)?124 kB? (?)
    apk (release)?1.64 MB? (?)
  • firebase-common-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?4.72 kB? (?)
    apk (aggressive)?124 kB? (?)
    apk (release)?1.64 MB? (?)
  • firebase-components

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?45.5 kB? (?)
    apk (aggressive)?23.3 kB? (?)
    apk (release)?596 kB? (?)
  • firebase-config

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?103 kB? (?)
    apk (aggressive)?161 kB? (?)
    apk (release)?1.71 MB? (?)
  • firebase-config-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?4.80 kB? (?)
    apk (aggressive)?162 kB? (?)
    apk (release)?1.71 MB? (?)
  • firebase-crashlytics

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?367 kB? (?)
    apk (aggressive)?441 kB? (?)
    apk (release)?2.19 MB? (?)
  • firebase-crashlytics-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.08 kB? (?)
    apk (aggressive)?441 kB? (?)
    apk (release)?2.19 MB? (?)
  • firebase-crashlytics-ndk

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?1.66 MB? (?)
    apk (aggressive / arm64-v8a)?1.61 MB? (?)
    apk (aggressive / armeabi-v7a)?1.08 MB? (?)
    apk (aggressive / x86)?1.59 MB? (?)
    apk (aggressive / x86_64)?1.65 MB? (?)
    apk (release / arm64-v8a)?3.35 MB? (?)
    apk (release / armeabi-v7a)?2.83 MB? (?)
    apk (release / x86)?3.33 MB? (?)
    apk (release / x86_64)?3.39 MB? (?)
  • firebase-database

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?537 kB? (?)
    apk (aggressive)?367 kB? (?)
    apk (release)?2.11 MB? (?)
  • firebase-database-collection

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?33.7 kB? (?)
    apk (aggressive)?312 kB? (?)
    apk (release)?942 kB? (?)
  • firebase-database-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.21 kB? (?)
    apk (aggressive)?368 kB? (?)
    apk (release)?2.12 MB? (?)
  • firebase-datatransport

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.82 kB? (?)
    apk (aggressive)?163 kB? (?)
    apk (release)?1.35 MB? (?)
  • firebase-decoders-json

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?7.76 kB? (?)
    apk (aggressive)?8.69 kB? (?)
    apk (release)?15.3 kB? (?)
  • firebase-dynamic-links

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?61.8 kB? (?)
    apk (aggressive)?369 kB? (?)
    apk (release)?1.94 MB? (?)
  • firebase-dynamic-links-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.59 kB? (?)
    apk (aggressive)?369 kB? (?)
    apk (release)?1.95 MB? (?)
  • firebase-dynamic-module-support

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.73 kB? (?)
    apk (aggressive)?124 kB? (?)
    apk (release)?1.31 MB? (?)
  • firebase-encoders

    TypeBase (859cb0c)Merge (f76c53e)Diff
    apk (aggressive)?8.69 kB? (?)
    apk (release)?15.3 kB? (?)
  • firebase-encoders-json

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?11.4 kB? (?)
    apk (aggressive)?24.0 kB? (?)
    apk (release)?596 kB? (?)
  • firebase-encoders-proto

    TypeBase (859cb0c)Merge (f76c53e)Diff
    apk (aggressive)?8.87 kB? (?)
    apk (release)?21.7 kB? (?)
  • firebase-encoders-reflective

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?7.88 kB? (?)
    apk (aggressive)?9.06 kB? (?)
    apk (release)?22.5 kB? (?)
  • firebase-firestore

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?1.41 MB? (?)
    apk (aggressive)?529 kB? (?)
    apk (release)?4.35 MB? (?)
  • firebase-firestore-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.20 kB? (?)
    apk (aggressive)?529 kB? (?)
    apk (release)?4.35 MB? (?)
  • firebase-functions

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?52.0 kB? (?)
    apk (aggressive)?409 kB? (?)
    apk (release)?2.20 MB? (?)
  • firebase-functions-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.21 kB? (?)
    apk (aggressive)?409 kB? (?)
    apk (release)?2.20 MB? (?)
  • firebase-inappmessaging

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?461 kB? (?)
    apk (aggressive)?710 kB? (?)
    apk (release)?4.34 MB? (?)
  • firebase-inappmessaging-display

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?185 kB? (?)
    apk (aggressive)?1.54 MB? (?)
    apk (release)?5.59 MB? (?)
  • firebase-inappmessaging-display-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?17.4 kB? (?)
    apk (aggressive)?1.55 MB? (?)
    apk (release)?5.60 MB? (?)
  • firebase-inappmessaging-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?4.81 kB? (?)
    apk (aggressive)?711 kB? (?)
    apk (release)?4.34 MB? (?)
  • firebase-installations

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?58.5 kB? (?)
    apk (aggressive)?127 kB? (?)
    apk (release)?1.67 MB? (?)
  • firebase-installations-interop

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?8.17 kB? (?)
    apk (aggressive)?65.2 kB? (?)
    apk (release)?652 kB? (?)
  • firebase-installations-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?4.73 kB? (?)
    apk (aggressive)?127 kB? (?)
    apk (release)?1.67 MB? (?)
  • firebase-messaging

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?146 kB? (?)
    apk (aggressive)?474 kB? (?)
    apk (release)?2.11 MB? (?)
  • firebase-messaging-directboot

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.19 kB? (?)
    apk (aggressive)?474 kB? (?)
    apk (release)?2.11 MB? (?)
  • firebase-messaging-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.53 kB? (?)
    apk (aggressive)?474 kB? (?)
    apk (release)?2.11 MB? (?)
  • firebase-ml-modeldownloader

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?127 kB? (?)
    apk (aggressive)?178 kB? (?)
    apk (release)?1.80 MB? (?)
  • firebase-ml-modeldownloader-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.15 kB? (?)
    apk (aggressive)?178 kB? (?)
    apk (release)?1.80 MB? (?)
  • firebase-perf

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?323 kB? (?)
    apk (aggressive)?1.26 MB? (?)
    apk (release)?3.77 MB? (?)
  • firebase-perf-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?14.8 kB? (?)
    apk (aggressive)?1.26 MB? (?)
    apk (release)?3.78 MB? (?)
  • firebase-sessions

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?144 kB? (?)
    apk (aggressive)?371 kB? (?)
    apk (release)?2.08 MB? (?)
  • firebase-storage

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?134 kB? (?)
    apk (aggressive)?373 kB? (?)
    apk (release)?1.99 MB? (?)
  • firebase-storage-ktx

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?5.21 kB? (?)
    apk (aggressive)?374 kB? (?)
    apk (release)?1.99 MB? (?)
  • protolite-well-known-types

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?1.00e+03 kB? (?)
    apk (aggressive)?134 kB? (?)
    apk (release)?666 kB? (?)
  • transport-api

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?6.81 kB? (?)
    apk (aggressive)?8.69 kB? (?)
    apk (release)?14.9 kB? (?)
  • transport-backend-cct

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?53.8 kB? (?)
    apk (aggressive)?57.6 kB? (?)
    apk (release)?105 kB? (?)
  • transport-runtime

    TypeBase (859cb0c)Merge (f76c53e)Diff
    aar?160 kB? (?)
    apk (aggressive)?44.6 kB? (?)
    apk (release)?79.1 kB? (?)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 19, 2023

Coverage Report 1

Affected Products

No changes between base commit (10f8ad5) and merge commit (2989de0).

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/4m1e9kj8fV.html

@@ -59,6 +59,7 @@ thirdPartyLicenses {
}

dependencies {
implementation libs.firebase.sessions
Copy link
Contributor

@mrober mrober Oct 20, 2023

Choose a reason for hiding this comment

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

I don't think we should add sessions like this since we depend on it via implementation(project(':firebase-sessions')) so we can make changes to sessions and crashlytics together easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, android studio did this for some reason and it works without it. I'm switching to vim.

@@ -3,16 +3,50 @@ package com.google.firebase.sessions {

public final class FirebaseSessions {
method @NonNull public static com.google.firebase.sessions.FirebaseSessions getInstance();
method @NonNull public static com.google.firebase.sessions.FirebaseSessions getInstance(@NonNull com.google.firebase.FirebaseApp app);
method public void register(@NonNull com.google.firebase.sessions.api.SessionSubscriber subscriber);
method @Deprecated @NonNull public static com.google.firebase.sessions.FirebaseSessions getInstance(@NonNull com.google.firebase.FirebaseApp app);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we can just remove these instance and getInstance methods? Now there is no useful public api in this class anymore. Maybe even make FirebaseSessions internal. And only the stuff in the api package be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it!

"data collection enabled: ${subscriber.isDataCollectionEnabled}"
)
}

/** Calculate whether we should sample events using [sessionSettings] data. */
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is left over from an earlier change. Can you delete it since you're already working in this file?

@@ -59,6 +59,7 @@ kotest-runner = { module = "io.kotest:kotest-runner-junit4-jvm", version.ref = "
kotest-assertions = { module = "io.kotest:kotest-assertions-core-jvm", version.ref = "kotest" }
kotest-property = { module = "io.kotest:kotest-property-jvm", version.ref = "kotest" }
quickcheck = { module = "net.java:quickcheck", version.ref = "quickcheck" }
firebase-sessions = { group = "com.google.firebase", name = "firebase-sessions", version = "1.0.2" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too

@jrothfeder jrothfeder merged commit 4beb35a into sessions-nine Oct 20, 2023
9 of 25 checks passed
@jrothfeder jrothfeder deleted the simplify-register branch October 20, 2023 19:05
@firebase firebase locked and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants