diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d24d32958..57329fe5f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,18 @@ ### Enhancements * Deprecate the `Realm.SourceGenerator` and `Realm.Fody` packages. The source generation and weaver assemblies are now contained in the main `Realm` package. This should be a transparent change for users who only referenced the `Realm` package, but if you explicitly added a package reference to `Realm.SourceGenerator` or `Realm.Fody`, you should remove it. (PR [#3319](https://github.com/realm/realm-dotnet/pull/3319)) +* New notifiers can now be registered in write transactions until changes have actually been made in the write transaction. This makes it so that new notifications can be registered inside change notifications triggered by beginning a write transaction (unless a previous callback performed writes). (Core 13.10.1) +* 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 (including the original support released in Core 11.0.0) will receive a "switch to flexible sync" error message when trying to sync with the app. (Core 13.11.0) +* Support sort/distinct based on values from a dictionary e.g. `.Filter("TRUEPREDICATE SORT(meta['age'])")`. (Core 13.14.0) ### Fixed -* None +* Fixed a fatal error (reported to the sync error handler) during client reset (or automatic PBS to FLX migration) if the reset has been triggered during an async open and the schema being applied has added new classes. (Core 13.11.0) +* Full text search would sometimes find words where the word only matches the beginning of the search token. (Core 13.11.0) +* We could crash when removing backlinks in cases where forward links did not have a corresponding backlink due to corruption. We now silently ignore this inconsistency in release builds, allowing the app to continue. (Core 13.12.0) +* `IDictionary` would expose unresolved links rather than mapping them to null. In addition to allowing invalid objects to be read from Dictionaries, this resulted in queries on Dictionaries sometimes having incorrect results. (Core 13.12.0) +* Access token refresh for websockets was not updating the location metadata. (Core 13.13.0) +* Using both synchronous and asynchronous transactions on the same thread or scheduler could hit the assertion failure "!realm.is_in_transaction()" if one of the callbacks for an asynchronous transaction happened to be scheduled during a synchronous transaction. (Core 13.13.0) +* Fixed a potential crash when opening the realm after failing to download a fresh FLX realm during an automatic client reset. (Core 13.14.0) ### Compatibility * Realm Studio: 13.0.0 or later. diff --git a/Realm/Realm/Handles/AppHandle.cs b/Realm/Realm/Handles/AppHandle.cs index bc922d4da1..eb58bd01d8 100644 --- a/Realm/Realm/Handles/AppHandle.cs +++ b/Realm/Realm/Handles/AppHandle.cs @@ -52,7 +52,6 @@ public static extern IntPtr initialize( [MarshalAs(UnmanagedType.LPWStr)] string framework_version, IntPtr framework_version_len, [MarshalAs(UnmanagedType.LPWStr)] string sdk_version, IntPtr sdk_version_len, [MarshalAs(UnmanagedType.LPWStr)] string platform_version, IntPtr platform_version_len, - [MarshalAs(UnmanagedType.LPWStr)] string cpu_arch, IntPtr cpu_arch_len, [MarshalAs(UnmanagedType.LPWStr)] string device_name, IntPtr device_name_len, [MarshalAs(UnmanagedType.LPWStr)] string device_version, IntPtr device_version_len, UserCallback user_callback, VoidTaskCallback void_callback, StringCallback string_callback, ApiKeysCallback api_keys_callback); @@ -171,8 +170,6 @@ public static void Initialize() platformVersion += $" {Environment.OSVersion.ServicePack}"; } - var cpuArch = RuntimeInformation.ProcessArchitecture.ToString(); - // TODO: try and infer device information as part of RNET-849 var deviceName = "unknown"; var deviceVersion = "unknown"; @@ -182,7 +179,6 @@ public static void Initialize() frameworkVersion, frameworkVersion.IntPtrLength(), sdkVersion, sdkVersion.IntPtrLength(), platformVersion, platformVersion.IntPtrLength(), - cpuArch, cpuArch.IntPtrLength(), deviceName, deviceName.IntPtrLength(), deviceVersion, deviceVersion.IntPtrLength(), userLogin, taskCallback, stringCallback, apiKeysCallback); diff --git a/wrappers/build-linux.sh b/wrappers/build-linux.sh index 96b954eaad..da24eb72e0 100755 --- a/wrappers/build-linux.sh +++ b/wrappers/build-linux.sh @@ -23,4 +23,17 @@ case $i in esac done -REALM_CMAKE_SUBPLATFORM="Linux-$libc/$ARCH" bash "$SCRIPT_DIRECTORY"/build.sh -c=$REALM_CMAKE_CONFIGURATION -DCMAKE_TOOLCHAIN_FILE="$SCRIPT_DIRECTORY/realm-core/tools/cmake/$ARCH.toolchain.cmake" -GNinja $EXTRA_CMAKE_ARGS +TOOLCHAIN_FILE="" +case $ARCH in + "x86_64") + TOOLCHAIN_FILE="x86_64-linux-gnu" + ;; + "armhf") + TOOLCHAIN_FILE="armv7-linux-gnueabihf" + ;; + "aarch64") + TOOLCHAIN_FILE="aarch64-linux-gnu" + ;; +esac + +REALM_CMAKE_SUBPLATFORM="Linux-$libc/$ARCH" bash "$SCRIPT_DIRECTORY"/build.sh -c=$REALM_CMAKE_CONFIGURATION -DCMAKE_TOOLCHAIN_FILE="$SCRIPT_DIRECTORY/realm-core/tools/cmake/$TOOLCHAIN_FILE.toolchain.cmake" -GNinja $EXTRA_CMAKE_ARGS \ No newline at end of file diff --git a/wrappers/realm-core b/wrappers/realm-core index 3ceabb4134..e6f38a2fa3 160000 --- a/wrappers/realm-core +++ b/wrappers/realm-core @@ -1 +1 @@ -Subproject commit 3ceabb413494a3f6101463d9bcf4459451c24369 +Subproject commit e6f38a2fa39360e747562cddcfb3f6d6fc4ee7fe diff --git a/wrappers/src/app_cs.cpp b/wrappers/src/app_cs.cpp index 5ef4493be4..207a25ad49 100644 --- a/wrappers/src/app_cs.cpp +++ b/wrappers/src/app_cs.cpp @@ -49,9 +49,7 @@ namespace realm { std::string s_framework; std::string s_framework_version; std::string s_sdk_version; - std::string s_platform; std::string s_platform_version; - std::string s_cpu_arch; std::string s_device_name; std::string s_device_version; @@ -103,7 +101,6 @@ extern "C" { uint16_t* framework_version, size_t framework_version_len, uint16_t* sdk_version, size_t sdk_version_len, uint16_t* platform_version, size_t platform_version_len, - uint16_t* cpu_arch, size_t cpu_arch_len, uint16_t* device_name, size_t device_name_len, uint16_t* device_version, size_t device_version_len, UserCallbackT* user_callback, @@ -115,24 +112,9 @@ extern "C" { s_framework_version = Utf16StringAccessor(framework_version, framework_version_len); s_sdk_version = Utf16StringAccessor(sdk_version, sdk_version_len); s_platform_version = Utf16StringAccessor(platform_version, platform_version_len); - s_cpu_arch = Utf16StringAccessor(cpu_arch, cpu_arch_len); s_device_name = Utf16StringAccessor(device_name, device_name_len); s_device_version = Utf16StringAccessor(device_version, device_version_len); -#if REALM_ANDROID - s_platform = "Android"; -#elif REALM_WINDOWS - s_platform = "Windows"; -#elif REALM_UWP - s_platform = "UWP"; -#elif REALM_IOS - s_platform = "iOS"; -#elif REALM_PLATFORM_APPLE - s_platform = "macOS"; -#else - s_platform = "Linux"; -#endif - s_user_callback = wrap_managed_callback(user_callback); s_void_callback = wrap_managed_callback(void_callback); s_string_callback = wrap_managed_callback(string_callback); @@ -151,9 +133,7 @@ extern "C" { config.device_info.framework_version = s_framework_version; config.device_info.sdk_version = s_sdk_version; config.device_info.sdk = "Dotnet"; - config.device_info.platform = s_platform; config.device_info.platform_version = s_platform_version; - config.device_info.cpu_arch = s_cpu_arch; config.device_info.device_name = s_device_name; config.device_info.device_version = s_device_version; diff --git a/wrappers/src/sort_descriptor_cs.cpp b/wrappers/src/sort_descriptor_cs.cpp index 0e2a77ef12..cdf9fc6cd1 100644 --- a/wrappers/src/sort_descriptor_cs.cpp +++ b/wrappers/src/sort_descriptor_cs.cpp @@ -38,7 +38,7 @@ REALM_EXPORT void sort_descriptor_destroy(DescriptorOrdering* descriptor) REALM_EXPORT void sort_descriptor_add_clause(DescriptorOrdering& descriptor, TableKey table_key, SharedRealm& realm, size_t* property_chain, size_t properties_count, bool ascending, bool replacing, NativeException::Marshallable& ex) { handle_errors(ex, [&]() { - std::vector column_keys; + std::vector column_keys; column_keys.reserve(properties_count); const std::vector* properties = &realm->schema().find(table_key)->persisted_properties;