-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Enable Snappy compression support in LevelDb in cmake builds #9596
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
Conversation
Coverage Report 1Affected Products
Test Logs |
Some of the checks are failing because cmake's |
…available A Python3 interpreter is required, and some GitHub Actions will find python2 instead, causing them to fail.
… on iOS to verify the fix to xcresult_logs.py in #9645
Size Report 1Affected ProductsTest Logs |
… instead just encode to UTF-8 in a relaxed manner and write the resulting bytes directly to stdout
…nd move the target_compile_definitions into the firebase_ios_add_test() cmake function
…void building the Firestore Objective-C layer.
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.
Reviewing - in the meantime, WDYT about getting the C++ SDK PR drafted (temporarily referencing this branch as its Firestore iOS SDK external cmake source) to make sure the build still works?
|
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.
Thank you for your changes and the explanations!
Enable Snappy compression support in LevelDb databases when compiled via cmake. This does not affect builds from xcode.
Snappy support is mainly required for firebase-unity-sdk. All builds of the Unity SDK to date had inadvertently included Snappy support by virtue of being compiled in Google's internal build environment. Builds of the Unity SDK from GitHub, however, did not include Snappy support. Therefore, if a customer upgraded from a version of the Unity SDK that included Snappy support to a version that does not, they would experience a crash like this:
The crash occurs because LevelDb tries to read a database that is compressed with Snappy, but Snappy compression support is not compiled in.
Note that only desktop platforms are affected by this crash: Windows, macOS, and Linux. Namely, the mobile platforms are not affected: Android, iOS, and watchOS. Android is not affected because it uses sqlite, not leveldb. iOS and watchOS are not affected because they get their LevelDb dependency from CocoaPods/Swift Package Manager, which never included Snappy support.
This PR was patched into the C++ SDK via firebase/firebase-cpp-sdk#885. This patching will be undone via firebase/firebase-cpp-sdk#932.
Googlers see b/227782613 for more details.
#no-changelog