-
Notifications
You must be signed in to change notification settings - Fork 154
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
Refactor Firebase JS externals using Web v9 modular SDK #319
Conversation
A lot of these changes look like just formatting? Makes it tricky to review - could you split the formatting / changes into separate commits so we can review this PR? |
546c719
to
bd371ed
Compare
@shepeliev I've found one potential issue but i'm not sure if it's caused by your PR or was there before:
|
@MinmoTech thanks for the comment. The PR is not a cause for this error. The reason is the bug in IR compiler: KT-48836. You can find a workaround here. |
Sorry for the ping and thanks for the help! |
Is this thread dead? It would really help if someone could review and approve this PR. |
can you rebase and then i can have another look at it |
@shepeliev Have you tried using |
Oh, looks like I didn't migrate that API to externals. Thanks for highlighting. I'll try to add it this weekend. |
can you resolve the conflicts please |
# Conflicts: # .github/workflows/pull_request.yml # firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt # firebase-database/src/commonTest/kotlin/dev/gitlive/firebase/database/database.kt # firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt # firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt
import kotlin.random.Random | ||
import kotlin.test.* | ||
|
||
expect val emulatorHost: String | ||
expect val context: Any | ||
expect fun runTest(test: suspend () -> Unit) | ||
expect fun runTest(test: suspend () -> Unit): TestResult |
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.
Since we are using kotlinx-coroutines-test
the result of runTest must be immediately returned from each test in JS.
@Reedyuk done |
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.
Looks good to me, but due to the sheer amount of changes, i would expect @nbransby to give it the approval.
@nbransby Could you please have a look at this? It's been a while. |
Although your effort is highly appreciated, the secret to getting timely approval on PRs is to produce small ones, this is huge and makes reviewers lose the will to live! A quick scan it looks good but also seems there's a fair few changes in there which are unrelated to the subject of the PR, can you highlight these and explain the rational? |
Yeap, you're might right there are some more changes than it would be wanted. However, I don't think it would make sence to migrate from Firbase JS v8 to v9 module by module in separate PRs just for reducing their size.
All of those changes are related to the PR subject exepting couple of lines that fix tests in JS. I've drop a comment earlier: It's required as at the moment JS tests are broken in the master branch and test nothing at all despite all of them are green. |
# Conflicts: # firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/user.kt # firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt # firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals2.kt # firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt # firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt # firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt # firebase-functions/src/jsMain/kotlin/dev/gitlive/firebase/functions/functions.kt
At the moment, despite the SDK is packaged with Web v9 Firebase libs we are using compat modules. The goal of this PR is to get rid legacy firebase externals in favor of modular SDK.
fixes #236
fixes #241
fixes #315
fixes #316