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

Upgrade to Realm Core v13.15.1 #5909

Merged
merged 6 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/pr-realm-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,16 @@ jobs:
build:
name: Build for ${{ matrix.variant.os }} ${{ matrix.variant.arch }}
runs-on: ${{ matrix.variant.runner }}
# if container is not set for a variant, this is a noop
container: ${{ matrix.variant.container }}
env:
REALM_DISABLE_ANALYTICS: 1
NDK_VERSION: 23.1.7779620
strategy:
fail-fast: false
matrix:
variant:
- { os: linux, runner: ubuntu-latest, arch: x64, artifact-path: packages/realm/prebuilds, test-node: true, test-electron: true, container: "ghcr.io/${{ github.repository }}/linux-x64:main" }
- { os: linux, runner: ubuntu-latest, arch: arm, artifact-path: packages/realm/prebuilds, container: "ghcr.io/${{ github.repository }}/linux-arm:main" }
- { os: linux, runner: ubuntu-latest, arch: arm64, artifact-path: packages/realm/prebuilds, container: "ghcr.io/${{ github.repository }}/linux-arm:main" }
- { os: linux, runner: ubuntu-latest, arch: x64, artifact-path: packages/realm/prebuilds, test-node: true, test-electron: true }
- { os: linux, runner: ubuntu-latest, arch: arm, artifact-path: packages/realm/prebuilds }
- { os: linux, runner: ubuntu-latest, arch: arm64, artifact-path: packages/realm/prebuilds }
- { os: windows, runner: windows-latest, arch: x64, artifact-path: packages/realm/prebuilds, test-node: true, test-electron: true }
- { os: windows, runner: windows-2019, arch: ia32, artifact-path: packages/realm/prebuilds }
- { os: android, runner: ubuntu-latest, arch: x86_64, artifact-path: packages/realm/react-native/android/src/main/jniLibs }
Expand Down Expand Up @@ -101,7 +99,7 @@ jobs:
# On linux, electron requires a connected display. We fake this by giving it a headless environment using xvfb
# Relevant issue: https://github.com/juliangruber/browser-run/issues/147
- name: Linux Environment setup
if: ${{ (matrix.variant.runner == 'ubuntu-latest') && (matrix.variant.container == '') }}
if: ${{ (matrix.variant.runner == 'ubuntu-latest') }}
run: sudo apt-get install ccache ninja-build

- name: Setup Java
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
// ...
peopleOver20.unsubscribe();
```
* Support sort/distinct based on values from a dictionary e.g. `TRUEPREDICATE SORT(meta['age'])`. ([realm/realm-core#5311](https://github.com/realm/realm-core/pull/5311))

### Fixed
* Fix a stack overflow crash when using the query parser with long chains of AND/OR conditions. ([realm/realm-core#6428](https://github.com/realm/realm-core/pull/6428), since v10.11.0)
Expand All @@ -50,6 +51,10 @@
* Performing a large number of queries without ever performing a write resulted in steadily increasing memory usage, some of which was never fully freed due to an unbounded cache. ([realm/realm-core#6530](https://github.com/realm/realm-core/pull/6530), since v10.19.0)
* Partition-Based to Flexible Sync Migration for migrating a client app that uses partition based sync to use flexible sync under the hood if the server has been migrated to flexible sync is officially supported with this release. Any clients using an older version of Realm will receive a "switch to flexible sync" error message when trying to sync with the app. ([realm/realm-core#6554](https://github.com/realm/realm-core/issues/6554), since v11.9.0)
* Fix deprecated namespace method warning when building for Android ([#5646](https://github.com/realm/realm-js/issues/5646))
* Fixed a potential crash when opening the realm after failing to download a fresh FLX realm during an automatic client reset. ([realm/realm-core#6494](https://github.com/realm/realm-core/issues/6494), since v10.19.5)
* Changing parameters for a query after initialization could lead to a crash. ([realm/realm-core#6674](https://github.com/realm/realm-core/pull/6674), since v10.20.0)
* Querying with object list arguments now works as expected. ([realm/realm-core#6688](https://github.com/realm/realm-core/pull/6688), since v10.3.3)
* Fixed a crash when session multiplexing was enabled, caused by a use-after-free in SessionWrapper when tearing down sessions. ([realm/realm-core#6656](https://github.com/realm/realm-core/pull/6656), since v13.9.3)

### Compatibility
* React Native >= v0.71.4
Expand All @@ -64,8 +69,8 @@
* Bump sync protocol to v9 to indicate client has fix for client reset error during async open. ([realm/realm-core#6609](https://github.com/realm/realm-core/issues/6609))
* Aligning analytics with other Realm SDKs. You can still disable the submission by setting environment variable `REALM_DISABLE_ANALYTICS`, and you can print out what is submitted by setting the environment variable `REALM_PRINT_ANALYTICS`.
* Disabling sync session multiplexing by default in the SDK, since Core's default changed to enabled with v13.11.0. ([#5831](https://github.com/realm/realm-js/pull/5831))
* Upgraded Realm Core from v13.11.1 to v13.13.0. ([#5873](https://github.com/realm/realm-js/pull/5873))
* Applied use of an opt-in list for Bindgen. ([#5820](https://github.com/realm/realm-js/pull/5820))
* Upgraded Realm Core from v13.11.1 to v13.15.1. ([#5873](https://github.com/realm/realm-js/pull/5873) & [#5909](https://github.com/realm/realm-js/pull/5909))

## 12.0.0-alpha.2 (2023-04-05)

Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ if(DEFINED CMAKE_JS_VERSION)
endif()
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(NODE_ARCH STREQUAL "arm")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vendor/realm-core/tools/cmake/armhf.toolchain.cmake")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vendor/realm-core/tools/cmake/armv7-linux-gnueabihf.toolchain.cmake")
# due to how multiarch works in debian this is needed to link to the correct system libraries
set(CMAKE_IGNORE_PATH "/usr/lib/x86_64-linux-gnu")
elseif(NODE_ARCH STREQUAL "arm64")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vendor/realm-core/tools/cmake/aarch64.toolchain.cmake")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vendor/realm-core/tools/cmake/aarch64-linux-gnu.toolchain.cmake")
set(CMAKE_IGNORE_PATH "/usr/lib/x86_64-linux-gnu")
elseif(NODE_ARCH STREQUAL "x64")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vendor/realm-core/tools/cmake/x86_64-linux-gnu.toolchain.cmake")
endif()
add_link_options(-fuse-ld=gold)
add_link_options(-Wl,-z,noexecstack)
Expand Down
2 changes: 1 addition & 1 deletion packages/realm/bindgen/js_opt_in_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ classes:
- custom
- username_password
- function
- user_api_key
- api_key

SyncUser:
methods:
Expand Down
2 changes: 1 addition & 1 deletion packages/realm/bindgen/vendor/realm-core
Submodule realm-core updated 81 files
+20 −0 .project
+58 −0 CHANGELOG.md
+2 −2 CMakeLists.txt
+17 −12 Jenkinsfile
+1 −10 Package.swift
+2 −4 bindgen/spec.yml
+3 −3 dependencies.list
+1 −1 evergreen/config.yml
+3 −0 evergreen/install_baas.sh
+1 −1 external/catch
+0 −0 linux.Dockerfile
+0 −2 packaging.Dockerfile
+2 −4 src/realm.h
+8 −0 src/realm/db.cpp
+4 −0 src/realm/db.hpp
+0 −39 src/realm/geospatial.hpp
+3 −9 src/realm/object-store/c_api/app.cpp
+1 −1 src/realm/object-store/impl/realm_coordinator.cpp
+26 −7 src/realm/object-store/results.cpp
+12 −0 src/realm/object-store/schema.cpp
+2 −0 src/realm/object-store/schema.hpp
+6 −2 src/realm/object-store/shared_realm.cpp
+7 −18 src/realm/object-store/sync/app_credentials.cpp
+5 −14 src/realm/object-store/sync/app_credentials.hpp
+6 −1 src/realm/object-store/sync/impl/emscripten/network_transport.cpp
+1 −1 src/realm/object-store/sync/sync_manager.cpp
+1 −1 src/realm/object-store/sync/sync_manager.hpp
+5 −23 src/realm/object-store/sync/sync_session.cpp
+177 −153 src/realm/parser/driver.cpp
+5 −4 src/realm/parser/driver.hpp
+6 −0 src/realm/query.cpp
+3 −0 src/realm/query.hpp
+66 −20 src/realm/query_engine.cpp
+21 −13 src/realm/query_engine.hpp
+77 −24 src/realm/sort_descriptor.cpp
+52 −7 src/realm/sort_descriptor.hpp
+149 −21 src/realm/sync/client.cpp
+13 −0 src/realm/sync/client_base.hpp
+15 −0 src/realm/sync/config.hpp
+1 −1 src/realm/sync/instruction_applier.cpp
+118 −95 src/realm/sync/noinst/client_impl_base.cpp
+5 −1 src/realm/sync/noinst/client_impl_base.hpp
+1 −1 src/realm/sync/noinst/client_reset.cpp
+1 −1 src/realm/sync/noinst/migration_store.cpp
+2 −2 src/realm/sync/noinst/migration_store.hpp
+7 −7 src/realm/sync/noinst/protocol_codec.hpp
+0 −29 src/realm/sync/subscriptions.cpp
+0 −4 src/realm/sync/subscriptions.hpp
+1 −1 test/benchmark-common-tasks/main.cpp
+66 −0 test/object-store/c_api/c_api.cpp
+168 −0 test/object-store/dictionary.cpp
+48 −4 test/object-store/realm.cpp
+45 −51 test/object-store/sync/app.cpp
+4 −4 test/object-store/sync/client_reset.cpp
+3 −3 test/object-store/sync/file.cpp
+7 −7 test/object-store/sync/flx_migration.cpp
+188 −38 test/object-store/sync/flx_sync.cpp
+8 −8 test/object-store/sync/metadata.cpp
+6 −6 test/object-store/sync/migration_store_test.cpp
+7 −7 test/object-store/sync/sync_manager.cpp
+5 −5 test/object-store/sync/user.cpp
+1 −1 test/object-store/util/test_utils.cpp
+4 −0 test/sync_fixtures.hpp
+1 −1 test/test_link_query_view.cpp
+45 −5 test/test_parser.cpp
+16 −16 test/test_query_geo.cpp
+63 −3 test/test_sync.cpp
+2 −2 test/test_table.cpp
+7 −7 test/test_table_view.cpp
+0 −29 tools/build-apple-device.sh
+1 −0 tools/build-cocoa.sh
+2 −2 tools/cmake/RealmConfig.cmake.in
+3 −0 tools/cmake/aarch64-linux-gnu.toolchain.cmake
+0 −16 tools/cmake/aarch64.toolchain.cmake
+0 −88 tools/cmake/android-build-openssl.sh.in
+0 −17 tools/cmake/armhf.toolchain.cmake
+3 −0 tools/cmake/armv7-linux-gnueabihf.toolchain.cmake
+19 −0 tools/cmake/linux.toolchain.base.cmake
+0 −3 tools/cmake/run_ldconfig.sh
+3 −0 tools/cmake/x86_64-linux-gnu.toolchain.cmake
+8 −33 tools/cmake/xcode.toolchain.cmake
2 changes: 1 addition & 1 deletion packages/realm/src/app-services/Credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class Credentials {
* @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}.
*/
static apiKey(key: string): Credentials {
return new Credentials(binding.AppCredentials.userApiKey(key));
return new Credentials(binding.AppCredentials.apiKey(key));
}

/**
Expand Down