Skip to content

Raise an error for enablePersistence() in memory-only build #3128

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
merged 1 commit into from
May 28, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

This fixes a regression in the memory-only build that went unnoticed because we never ran the memory-only integration tests on CI (see #3127).

We need to throw the right error if enablePersistence() is used in the memory-only build. If it is used, the "durable" flag will be true in the MemoryComponentProvider, which should trigger a user-level exception and not a debugAssert.

Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

wooot

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 28, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (ec1471c) Head (cc44ddc) Diff
    browser 251 kB 252 kB +55 B (+0.0%)
    esm2017 195 kB 195 kB +61 B (+0.0%)
    main 494 kB 494 kB +43 B (+0.0%)
    module 249 kB 249 kB +55 B (+0.0%)
  • @firebase/firestore/memory

    Type Base (ec1471c) Head (cc44ddc) Diff
    browser 192 kB 192 kB +55 B (+0.0%)
    esm2017 149 kB 149 kB +61 B (+0.0%)
    main 370 kB 370 kB +43 B (+0.0%)
    module 190 kB 190 kB +55 B (+0.0%)
  • firebase

    Type Base (ec1471c) Head (cc44ddc) Diff
    firebase-firestore.js 290 kB 290 kB +57 B (+0.0%)
    firebase-firestore.memory.js 232 kB 232 kB +57 B (+0.0%)
    firebase.js 823 kB 823 kB +57 B (+0.0%)

Test Logs

@schmidt-sebastian schmidt-sebastian merged commit 7de1a7c into master May 28, 2020
@firebase firebase locked and limited conversation to collaborators Jun 28, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/fixmemoryerror branch July 9, 2020 17:44
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.

3 participants