Skip to content

Commit 74f4a53

Browse files
committed
Release 10.6.0
2 parents 8cb9c21 + 085a392 commit 74f4a53

File tree

308 files changed

+46666
-7616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+46666
-7616
lines changed

CHANGELOG.md

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,117 @@
1+
## 10.6.0 (2021-06-15)
2+
3+
This release combines all changes from 10.6.0-BETA.1 and 10.6.0-BETA.2.
4+
5+
### Breaking Changes
6+
* [RealmApp] Sync protocol version increased to 3. This version adds support for the new data types introduced in file format version 21.
7+
* Primary keys now have automatic indexes again. Indexes was removed in v10.0.0 because they were not needed, but it caused issues when upgrading from a pre v10 version of Realm, and in some cases resulted in large delays when upgrading the fileformat. (Issue [#7426](https://github.com/realm/realm-java/issues/7426), since 10.0.0).
8+
* Queries no longer do nullability checks on non-nullable fields, so using `null` as an argument will not throw an `IllegalArgumentException`.
9+
* String query filters `contains`, `beginsWith`, `endsWith`, and `like`, now throw a null pointer exception on null values.
10+
* The query builder no longer throw `IllegalStateException` but `IllegalArgumentException`.
11+
* The `distinct` query filter on unsupported fields no longer throws an exception when applied through when querying across relationships.
12+
* The `distinct` query filter no longer throws an exception when applied on non-existent fields.
13+
* `RealmFieldType` has been updated to account for the new types being added.
14+
15+
### Enhancements
16+
* Added support for `java.util.UUID` as supported field in model classes.
17+
* Added support for `java.util.UUID` as a primary key.
18+
* Added support for `RealmAny` as supported field in model classes. A `RealmAny` is used to represent a polymorphic Realm value or Realm Object, is indexable but cannot be used as a primary key. See [Javadoc for RealmAny](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmAny.html).
19+
* Added support for `RealmDictionary` as supported field in model classes. A `RealmDictionary` is a `Map` of strings to values - all types under the `RealmAny` umbrella can be used as values. See [Javadoc for RealmDictionary](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmDictionary.html) and [Javadoc for RealmMap](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmMap.html). `RealmDictionary` is not yet supported by any of the `Realm.insert` and `Realm.createFromJson` methods - This support will be added in a future release.
20+
* Added support for `RealmSet` as supported field in model classes. A `RealmSet` is a collection that implements the Java `Set` interface and contains no duplicate values - all types under the `RealmAny` umbrella can be used as values. See [Javadoc for RealmSet](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmSet.html). `RealmSet` is not yet supported by any of the `Realm.insert` and `Realm.createFromJson` methods - This support will be added in a future release.
21+
* Allow UTF8 encoded characters in property names in string-based queries ([#4467](https://github.com/realm/realm-core/issues/4467))
22+
* The error message when the initial steps of opening a Realm file fails is now more descriptive.
23+
* Make conversion of Decimal128 to/from string work for numbers with more than 19 significant digits. ([#4548](https://github.com/realm/realm-core/issues/4548))
24+
* Remove type coercion on bool and ObjectId when doing queries.
25+
* Allow passing arguments into string-based query predicates.
26+
* Queries across relationships now support the `between` operator.
27+
* Queries on numerical fields (byte, short, int, long, float, double, decimal128) now accept any numerical value as an argument.
28+
* `isEmpty` query filter can now be applied on `RealmList` and `RealmObject` fields.
29+
30+
### Fixed
31+
* Fix assertion failures such as "!m_notifier_skip_version.version" or "m_notifier_sg->get_version() + 1 == new_version.version" when performing writes inside change notification callbacks. Previously refreshing the Realm by beginning a write transaction would skip delivering notifications, leaving things in an inconsistent state. Notifications are now delivered recursively when needed instead. ([Cocoa #7165](https://github.com/realm/realm-cocoa/issues/7165)).
32+
* Fixed name aliasing not working in sort/distinct clauses when doing string-based queries. ([#4550](https://github.com/realm/realm-core/issues/4550), never before working).
33+
* Potential/unconfirmed fix for crashes associated with failure to memory map (low on memory, low on virtual address space). For example ([#4514](https://github.com/realm/realm-core/issues/4514)).
34+
* Syncing large Decimal128 values will cause "Assertion failed: cx.w[1] == 0" ([#4519](https://github.com/realm/realm-core/issues/4519), since v10.0.0)
35+
* Classes names "class_class_..." were not handled correctly when doing queries ([#4480](https://github.com/realm/realm-core/issues/4480))
36+
* Fix collection notification reporting for modifications. This could be observed by receiving the wrong indices of modifications on sorted or distinct results, or notification blocks sometimes not being called when only modifications have occurred. ([#4573](https://github.com/realm/realm-core/pull/4573) since v6).
37+
38+
### Compatibility
39+
* File format: Generates Realms with format v22. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
40+
* APIs are backwards compatible with all previous release of realm-java in the 10.6.y series.
41+
* Realm Studio 11.0.0-alpha.0 or above is required to open Realms created by this version.
42+
43+
### Internal
44+
* Updated to Realm Core 11.0.3, commit de25ad9db783f931e7652d5c1431d5610b2ad67b.
45+
46+
47+
## 10.6.0-BETA.2 (2021-06-14)
48+
49+
### Breaking Changes
50+
* ``MapChangeSet.getDeletionsCount()` has been replaced with `MapChangeSet.getDeletions()` that return the keys for entries that has been deleted instead of just the number of deleted entries.
51+
* Primary keys now have automatic indexes again. Indexes was removed in v10.0.0 because they were not needed, but it caused issues when upgrading from a pre v10 version of Realm, and in some cases resulted in large delays when upgrading the fileformat. (Issue [#7426](https://github.com/realm/realm-java/issues/7426), since 10.0.0).
52+
53+
### Enhancements
54+
* Allow `insert` and `insertOrUpdate` operations on `RealmObject` or `RealmObject` collections containing `RealmDictionary` or `RealmSet` fields.
55+
* Added support for `RealmDictionary` in `DynamicRealmObject` with `setDictionary(String fieldName, RealmDictionary<?> dictionary)`, `getDictionary(String fieldName, Class<?> primitiveType)`, and `getDictionary(String fieldName)`.
56+
* Added support for `RealmSet` in `DynamicRealmObject` with `setRealmSet(String fieldName, RealmSet<?> realmSet)`, `getRealmSet(String fieldName, Class<?> primitiveType)`, and `getRealmSet(String fieldName)`.
57+
58+
### Fixed
59+
* Removed wrong `@Nullable` annotation on `RealmQuery.maxRealmAny()`.
60+
* Fixed `RealmAny.getValueClass()` returning the `RealmObject` proxy class instead of the model class on a `RealmAny` referencing a managed `RealmObject`.
61+
62+
### Compatibility
63+
* File format: Generates Realms with format v22. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
64+
* APIs are backwards compatible with all previous release of realm-java in the 10.6.y series.
65+
* Realm Studio 11.0.0-alpha.0 or above is required to open Realms created by this version.
66+
67+
### Internal
68+
* Updated to Realm Core 11.0.2, commit a30382469eb72c0cf1824b44e7062071c2f3f3a9.
69+
* Updated to Gradle 6.8.3.
70+
71+
72+
## 10.6.0-BETA.1 (2021-05-17)
73+
74+
### Breaking Changes
75+
* [RealmApp] Sync protocol version increased to 3. This version adds support for the new data types introduced in file format version 21.
76+
* File format version bumped to 21. In this version we support new basic datatypes `UUID` and `RealmAny`, as well as `RealmSet` and `RealmMap` collections with string-based keys (i.e. `RealmDictionary`).
77+
* Queries no longer do nullability checks on non-nullable fields, so using `null` as an argument will not throw an `IllegalArgumentException`.
78+
* String query filters `contains`, `beginsWith`, `endsWith`, and `like`, now throw a null pointer exception on null values.
79+
* The query builder no longer throw `IllegalStateException` but `IllegalArgumentException`.
80+
* The `distinct` query filter on unsupported fields no longer throws an exception when applied through when querying across relationships.
81+
* The `distinct` query filter no longer throws an exception when applied on non-existent fields.
82+
83+
### Enhancements
84+
* Added support for `java.util.UUID` as supported field in model classes.
85+
* Added support for `java.util.UUID` as a primary key.
86+
* Added support for `RealmAny` as supported field in model classes. A `RealmAny` is used to represent a polymorphic Realm value or Realm Object, is indexable but cannot be used as a primary key. See [Javadoc for RealmAny](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmAny.html).
87+
* Added support for `RealmDictionary` as supported field in model classes. A `RealmDictionary` is a `Map` of strings to values - all types under the `RealmAny` umbrella can be used as values. See [Javadoc for RealmDictionary](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmDictionary.html) and [Javadoc for RealmMap](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmMap.html). `RealmDictionary` is not yet supported by any of the `Realm.insert` and `Realm.createFromJson` methods - This support will be added in a future release.
88+
* Added support for `RealmSet` as supported field in model classes. A `RealmSet` is a collection that implements the Java `Set` interface and contains no duplicate values - all types under the `RealmAny` umbrella can be used as values. See [Javadoc for RealmSet](https://docs.mongodb.com/realm-sdks/java/latest/io/realm/RealmSet.html). `RealmSet` is not yet supported by any of the `Realm.insert` and `Realm.createFromJson` methods - This support will be added in a future release.
89+
* Allow UTF8 encoded characters in property names in string-based queries ([#4467](https://github.com/realm/realm-core/issues/4467))
90+
* The error message when the initial steps of opening a Realm file fails is now more descriptive.
91+
* Make conversion of Decimal128 to/from string work for numbers with more than 19 significant digits. ([#4548](https://github.com/realm/realm-core/issues/4548))
92+
* Remove type coercion on bool and ObjectId when doing queries.
93+
* Allow passing arguments into string-based query predicates.
94+
* Queries across relationships now support the `between` operator.
95+
* Queries on numerical fields (byte, short, int, long, float, double, decimal128) now accept any numerical value as an argument.
96+
* `isEmpty` query filter can now be applied on `RealmList` and `RealmObject` fields.
97+
98+
### Fixed
99+
* Fix assertion failures such as "!m_notifier_skip_version.version" or "m_notifier_sg->get_version() + 1 == new_version.version" when performing writes inside change notification callbacks. Previously refreshing the Realm by beginning a write transaction would skip delivering notifications, leaving things in an inconsistent state. Notifications are now delivered recursively when needed instead. ([Cocoa #7165](https://github.com/realm/realm-cocoa/issues/7165)).
100+
* Fixed name aliasing not working in sort/distinct clauses when doing string-based queries. ([#4550](https://github.com/realm/realm-core/issues/4550), never before working).
101+
* Potential/unconfirmed fix for crashes associated with failure to memory map (low on memory, low on virtual address space). For example ([#4514](https://github.com/realm/realm-core/issues/4514)).
102+
* Syncing large Decimal128 values will cause "Assertion failed: cx.w[1] == 0" ([#4519](https://github.com/realm/realm-core/issues/4519), since v10.0.0)
103+
* Classes names "class_class_..." were not handled correctly when doing queries ([#4480](https://github.com/realm/realm-core/issues/4480))
104+
* Fix collection notification reporting for modifications. This could be observed by receiving the wrong indices of modifications on sorted or distinct results, or notification blocks sometimes not being called when only modifications have occurred. ([#4573](https://github.com/realm/realm-core/pull/4573) since v6).
105+
106+
### Compatibility
107+
* File format: Generates Realms with format v21. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
108+
* APIs are backwards compatible with all previous release of realm-java in the 10.6.y series.
109+
* Realm Studio 11.0.0-alpha.0 or above is required to open Realms created by this version.
110+
111+
### Internal
112+
* Updated to Realm Core 11.0.0-beta.4, commit: d50aef63a8aaf435e3afed82b589b47d8e1ab1ab.
113+
114+
1115
## 10.5.1 (2021-06-14)
2116

3117
### Enhancements
@@ -46,7 +160,7 @@
46160

47161
## 10.4.0 (2021-03-26)
48162

49-
All releases from 10.4.0 and forward are now found on `mavenCentral()` instead of `jcenter()`.
163+
All releases from 10.4.0 and forward are now found on `mavenCentral()` instead of `jcenter()`.
50164

51165
A minimal supported setup will therefore now look like this:
52166

@@ -96,7 +210,7 @@ for more information.
96210
* None.
97211

98212
### Fixes
99-
* RxJava Flowables/Observables and Coroutine Flows would crash if they were created from a `RealmList` and the parent object holding the list was deleted. Now, the stream is disposed/closed instead. (Issue [#7242](https://github.com/realm/realm-java/issues/7242))
213+
* RxJava Flowables/Observables and Coroutine Flows would crash if they were created from a `RealmList` and the parent object holding the list was deleted. Now, the stream is disposed/closed instead. (Issue [#7242](https://github.com/realm/realm-java/issues/7242))
100214
* Fixes Realm models default values containing objects with a PK might crash with a `RealmPrimaryKeyConstraintException`. (Issue [#7269] (https://github.com/realm/realm-java/issues/7269))
101215

102216
### Compatibility

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ENV ANDROID_HOME /opt/android-sdk-linux
1414
# Need by cmake
1515
ENV ANDROID_NDK_HOME /opt/android-ndk
1616
ENV ANDROID_NDK /opt/android-ndk
17-
ENV PATH ${PATH}:${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
17+
ENV PATH ${PATH}:${ANDROID_HOME}/emulator:${ANDROID_HOME}/cmdline-tools/latest:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools
1818
ENV PATH ${PATH}:${NDK_HOME}
1919
ENV NDK_CCACHE /usr/bin/ccache
2020
ENV CCACHE_CPP2 yes
@@ -52,9 +52,12 @@ RUN DEBIAN_FRONTEND=noninteractive \
5252
&& apt-get clean
5353

5454
# Install the Android SDK
55+
# See https://developer.android.com/studio/index.html#downloads for latest version
5556
RUN cd /opt && \
56-
wget -q https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O android-tools-linux.zip && \
57-
unzip android-tools-linux.zip -d ${ANDROID_HOME} && \
57+
wget -q https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip -O android-tools-linux.zip && \
58+
mkdir --parents ${ANDROID_HOME}/cmdline-tools/latest && \
59+
unzip android-tools-linux.zip -d ${ANDROID_HOME}/cmdline-tools/latest && \
60+
mv ${ANDROID_HOME}/cmdline-tools/latest/cmdline-tools/* ${ANDROID_HOME}/cmdline-tools/latest/ && \
5861
rm -f android-tools-linux.zip
5962

6063
# Grab what's needed in the SDK

Jenkinsfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import groovy.json.JsonOutput
77
// CONSTANTS
88

99
// Branches from which we release SNAPSHOT's. Only release branches need to run on actual hardware.
10-
releaseBranches = ['master', 'next-major', 'v10', 'releases']
10+
releaseBranches = ['master', 'next-major', 'support-new-datatypes', 'releases']
1111
// Branches that are "important", so if they do not compile they will generate a Slack notification
12-
slackNotificationBranches = [ 'master', 'releases', 'next-major', 'v10' ]
12+
slackNotificationBranches = [ 'master', 'releases', 'next-major', 'support-new-datatypes' ]
1313
// WARNING: Only set to `false` as an absolute last resort. Doing this will disable all integration
1414
// tests.
1515
enableIntegrationTests = true
@@ -236,7 +236,20 @@ def runBuild(buildFlags, instrumentationTestTarget) {
236236
if (isReleaseBranch) {
237237
signingFlags = "-PsignBuild=true -PsignSecretRingFile=\"${SIGN_KEY}\" -PsignPassword=${SIGN_KEY_PASSWORD}"
238238
}
239-
sh "./gradlew assemble ${buildFlags} ${signingFlags} --stacktrace"
239+
// Work around https://github.com/realm/realm-java/issues/7476 by building each artifact independantly instead
240+
// of using Gradle to call down into sub projects (which seems to trigger a bug somewhere).
241+
sh """
242+
cd realm-annotations
243+
./gradlew publishToMavenLocal ${buildFlags} ${signingFlags} --stacktrace
244+
cd ../realm-transformer
245+
./gradlew publishToMavenLocal ${buildFlags} ${signingFlags} --stacktrace
246+
cd ../library-build-transformer
247+
./gradlew publishToMavenLocal ${buildFlags} ${signingFlags} --stacktrace
248+
cd ../gradle-plugin
249+
./gradlew publishToMavenLocal ${buildFlags} ${signingFlags} --stacktrace
250+
cd ../realm
251+
./gradlew publishToMavenLocal ${buildFlags} ${signingFlags} --stacktrace
252+
"""
240253
}
241254
}
242255

@@ -308,7 +321,7 @@ def runBuild(buildFlags, instrumentationTestTarget) {
308321
},
309322
'Gradle Plugin' : {
310323
try {
311-
gradle('gradle-plugin', 'check --debug')
324+
gradle('gradle-plugin', 'check')
312325
} finally {
313326
storeJunitResults 'gradle-plugin/build/test-results/test/TEST-*.xml'
314327
}

dependencies.list

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ REALM_CORE=10.3.3
44

55
# Version of MongoDB Realm used by integration tests
66
# See https://github.com/realm/ci/packages/147854 for available versions
7-
MONGODB_REALM_SERVER=2021-03-09
7+
MONGODB_REALM_SERVER=2021-04-22
88

99
# Common Android settings across projects
1010
GRADLE_BUILD_TOOLS=4.0.0
@@ -13,7 +13,7 @@ KOTLIN=1.3.72
1313
KOTLIN_COROUTINES=1.3.9
1414

1515
# Common classpath dependencies
16-
gradle=6.5
16+
gradle=6.8.3
1717
ndkVersion=22.0.7026061
1818
BUILD_INFO_EXTRACTOR_GRADLE=4.17.0
1919
GRADLE_BINTRAY_PLUGIN=1.8.5
3.22 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)