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

Refactor async open to add support for Task cancellation #8148

Merged
merged 6 commits into from
Mar 3, 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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,26 @@ x.y.z Release notes (yyyy-MM-dd)
which contains information about what was rejected and why. This information
is intended primarily for debugging and logging purposes and may not have a
stable format. ([PR #8002](https://github.com/realm/realm-swift/pull/8002))
* Async `Realm.init()` now handles Task cancellation and will cancel the async
open if the Task is cancelled ([PR #8148](https://github.com/realm/realm-swift/pull/8148)).
* Cancelling async opens now has more consistent behavior. The previously
intended and documented behavior was that cancelling an async open would
result in the callback associated with the specific task that was cancelled
never being called, and all other pending callbacks would be invoked with an
ECANCELED error. This never actually worked correctly, and the callback which
was not supposed to be invoked at all sometimes would be. We now
unconditionally invoke all of the exactly once, passing ECANCELED to all of
them ([PR #8148](https://github.com/realm/realm-swift/pull/8148)).

### Fixed
* `UserPublisher` incorrectly bounced all notifications to the main thread instead
of setting up the Combine publisher to correctly receive on the main thread.
([#8132](https://github.com/realm/realm-swift/issues/8132), since 10.21.0)
* Fix warnings when building with Xcode 14.3 beta 1.
Errors in async open resulting from invalid queries in `initialSubscriptions`
would result in the callback being invoked with both a non-nil Realm and a
non-nil Error even though the Realm was in an invalid state. Now only the
error is passed to the callback ([PR #8148](https://github.com/realm/realm-swift/pull/8148), since v10.28.0).

<!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->
* Converting a local realm to a synced realm would crash if an embedded object
Expand Down
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ let package = Package(
"Realm/RLMAnalytics.mm",
"Realm/RLMArray.mm",
"Realm/RLMAsymmetricObject.mm",
"Realm/RLMAsyncTask.mm",
"Realm/RLMClassInfo.mm",
"Realm/RLMCollection.mm",
"Realm/RLMConstants.m",
Expand All @@ -182,6 +183,7 @@ let package = Package(
"Realm/RLMRealmConfiguration.mm",
"Realm/RLMRealmUtil.mm",
"Realm/RLMResults.mm",
"Realm/RLMScheduler.mm",
"Realm/RLMSchema.mm",
"Realm/RLMSectionedResults.mm",
"Realm/RLMSet.mm",
Expand Down
4 changes: 3 additions & 1 deletion Realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Pod::Spec.new do |s|
# Realm module
'include/RLMArray.h',
'include/RLMAsymmetricObject.h',
'include/RLMAsyncTask.h',
'include/RLMCollection.h',
'include/RLMConstants.h',
'include/RLMDecimal128.h',
Expand Down Expand Up @@ -84,6 +85,7 @@ Pod::Spec.new do |s|
private_header_files = 'include/RLMAccessor.h',
'include/RLMApp_Private.h',
'include/RLMArray_Private.h',
'include/RLMAsyncTask_Private.h',
'include/RLMBSON_Private.h',
'include/RLMCollection_Private.h',
'include/RLMDictionary_Private.h',
Expand All @@ -100,6 +102,7 @@ Pod::Spec.new do |s|
'include/RLMRealmConfiguration_Private.h',
'include/RLMRealm_Private.h',
'include/RLMResults_Private.h',
'include/RLMScheduler.h',
'include/RLMSchema_Private.h',
'include/RLMSet_Private.h',
'include/RLMSwiftProperty.h',
Expand All @@ -108,7 +111,6 @@ Pod::Spec.new do |s|
'include/RLMUpdateResult_Private.h',
'include/RLMUser_Private.h',


s.frameworks = 'Security'
s.module_map = 'Realm/Realm.modulemap'
s.compiler_flags = "-DREALM_HAVE_CONFIG -DREALM_COCOA_VERSION='@\"#{s.version}\"' -D__ASSERTMACROS__ -DREALM_ENABLE_SYNC"
Expand Down
34 changes: 32 additions & 2 deletions Realm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
3F08725527F3B5E0007A1175 /* libcompression.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F08725427F3B5E0007A1175 /* libcompression.tbd */; };
3F08725627F3B5EB007A1175 /* libcompression.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F08725427F3B5E0007A1175 /* libcompression.tbd */; };
3F08725727F3B87A007A1175 /* libcompression.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F08725427F3B5E0007A1175 /* libcompression.tbd */; };
3F0BBB9729AFDA6600FEA7A7 /* RLMScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F0BBB9529AFDA6600FEA7A7 /* RLMScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
3F0BBB9829AFDA6600FEA7A7 /* RLMScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F0BBB9529AFDA6600FEA7A7 /* RLMScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
3F0BBB9929AFDA6600FEA7A7 /* RLMScheduler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3F0BBB9629AFDA6600FEA7A7 /* RLMScheduler.mm */; };
3F0BBB9A29AFDA6600FEA7A7 /* RLMScheduler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3F0BBB9629AFDA6600FEA7A7 /* RLMScheduler.mm */; };
3F102CBD23DBC68300108FD2 /* Combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F102CBC23DBC68300108FD2 /* Combine.swift */; };
3F149CCB2668112A00111D65 /* PersistedProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F149CCA2668112A00111D65 /* PersistedProperty.swift */; };
3F1D8D33265B071000593ABA /* RLMValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F1D8D30265B071000593ABA /* RLMValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -236,10 +240,14 @@
3FC3F915241808B400E27322 /* RLMEmbeddedObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FC3F911241808B300E27322 /* RLMEmbeddedObject.mm */; };
3FC3F9172419B63200E27322 /* EmbeddedObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC3F9162419B63100E27322 /* EmbeddedObject.swift */; };
3FCB1A7522A9B0A2003807FB /* CodableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FCB1A7422A9B0A2003807FB /* CodableTests.swift */; };
3FD0D7CE2967CA1E0031C196 /* RLMMongoCollection_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = CF76F7D224816AAA00890DD2 /* RLMMongoCollection_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FD0D7CF2967CA1F0031C196 /* RLMMongoCollection_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = CF76F7D224816AAA00890DD2 /* RLMMongoCollection_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FCC56E429A55607004C5057 /* RLMSwiftObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FCC56E329A55607004C5057 /* RLMSwiftObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FCC56E529A55607004C5057 /* RLMSwiftObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FCC56E329A55607004C5057 /* RLMSwiftObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FD0D7C729675A2E0031C196 /* RLMAsyncTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD0D7C529675A2E0031C196 /* RLMAsyncTask.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FD0D7C829675A2E0031C196 /* RLMAsyncTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD0D7C529675A2E0031C196 /* RLMAsyncTask.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FD0D7C929675A2E0031C196 /* RLMAsyncTask.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FD0D7C629675A2E0031C196 /* RLMAsyncTask.mm */; };
3FD0D7CA29675A2E0031C196 /* RLMAsyncTask.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FD0D7C629675A2E0031C196 /* RLMAsyncTask.mm */; };
3FD0D7CE2967CA1E0031C196 /* RLMMongoCollection_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = CF76F7D224816AAA00890DD2 /* RLMMongoCollection_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FD0D7CF2967CA1F0031C196 /* RLMMongoCollection_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = CF76F7D224816AAA00890DD2 /* RLMMongoCollection_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FDAB841290B4CCB00168F24 /* RLMError.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FDAB83E290B4CCB00168F24 /* RLMError.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FDAB842290B4CCB00168F24 /* RLMError.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FDAB83E290B4CCB00168F24 /* RLMError.h */; settings = {ATTRIBUTES = (Public, ); }; };
3FDAB845290B4CCB00168F24 /* RLMError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FDAB840290B4CCB00168F24 /* RLMError.mm */; };
Expand All @@ -250,6 +258,8 @@
3FDAB84C290B7A0200168F24 /* file-format-version-10.realm in Resources */ = {isa = PBXBuildFile; fileRef = 3FDAB84B290B7A0200168F24 /* file-format-version-10.realm */; };
3FDAB84D290B7A0200168F24 /* file-format-version-10.realm in Resources */ = {isa = PBXBuildFile; fileRef = 3FDAB84B290B7A0200168F24 /* file-format-version-10.realm */; };
3FDAB84E290B7A0200168F24 /* file-format-version-10.realm in Resources */ = {isa = PBXBuildFile; fileRef = 3FDAB84B290B7A0200168F24 /* file-format-version-10.realm */; };
3FDB67152970720E0052233B /* RLMAsyncTask_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD0D7CB29675AE10031C196 /* RLMAsyncTask_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FDB67162970720E0052233B /* RLMAsyncTask_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD0D7CB29675AE10031C196 /* RLMAsyncTask_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
3FDCFEB619F6A8D3005E414A /* RLMSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E88C36FF19745E5500C9963D /* RLMSupport.swift */; };
3FDE338D19C39A87003B7DBA /* RLMSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E88C36FF19745E5500C9963D /* RLMSupport.swift */; };
3FE267D5264308680030F83C /* CollectionAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE267CF264308670030F83C /* CollectionAccess.swift */; };
Expand Down Expand Up @@ -854,6 +864,8 @@
3F0338491E6F466D00F9E288 /* RLMAccessor.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = RLMAccessor.hpp; sourceTree = "<group>"; };
3F04EA2D1992BEE400C2CE2E /* PerformanceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PerformanceTests.m; sourceTree = "<group>"; };
3F08725427F3B5E0007A1175 /* libcompression.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcompression.tbd; path = usr/lib/libcompression.tbd; sourceTree = SDKROOT; };
3F0BBB9529AFDA6600FEA7A7 /* RLMScheduler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RLMScheduler.h; sourceTree = "<group>"; };
3F0BBB9629AFDA6600FEA7A7 /* RLMScheduler.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMScheduler.mm; sourceTree = "<group>"; };
3F0F029D1B6FFE610046A4D5 /* KVOTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KVOTests.mm; sourceTree = "<group>"; };
3F0F02AC1B6FFF3D0046A4D5 /* RLMObservation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = RLMObservation.hpp; sourceTree = "<group>"; };
3F0F02AD1B6FFF3D0046A4D5 /* RLMObservation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMObservation.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -939,6 +951,9 @@
3FC3F9162419B63100E27322 /* EmbeddedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmbeddedObject.swift; sourceTree = "<group>"; };
3FCB1A7422A9B0A2003807FB /* CodableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableTests.swift; sourceTree = "<group>"; };
3FCC56E329A55607004C5057 /* RLMSwiftObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMSwiftObject.h; sourceTree = "<group>"; };
3FD0D7C529675A2E0031C196 /* RLMAsyncTask.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RLMAsyncTask.h; sourceTree = "<group>"; };
3FD0D7C629675A2E0031C196 /* RLMAsyncTask.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMAsyncTask.mm; sourceTree = "<group>"; };
3FD0D7CB29675AE10031C196 /* RLMAsyncTask_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMAsyncTask_Private.h; sourceTree = "<group>"; };
3FDAB83E290B4CCB00168F24 /* RLMError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMError.h; sourceTree = "<group>"; };
3FDAB83F290B4CCB00168F24 /* RLMError_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = RLMError_Private.hpp; sourceTree = "<group>"; };
3FDAB840290B4CCB00168F24 /* RLMError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMError.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1876,6 +1891,9 @@
E81A1F651955FC9300FDED82 /* RLMArray_Private.hpp */,
AC813610287F21700029F15E /* RLMAsymmetricObject.h */,
AC813611287F21700029F15E /* RLMAsymmetricObject.mm */,
3FD0D7C529675A2E0031C196 /* RLMAsyncTask.h */,
3FD0D7C629675A2E0031C196 /* RLMAsyncTask.mm */,
3FD0D7CB29675AE10031C196 /* RLMAsyncTask_Private.h */,
3F9863BA1D36876B00641C98 /* RLMClassInfo.hpp */,
3F9863B91D36876B00641C98 /* RLMClassInfo.mm */,
02B8EF5B19E7048D0045A93D /* RLMCollection.h */,
Expand Down Expand Up @@ -1949,6 +1967,8 @@
E81A1F6A1955FC9300FDED82 /* RLMResults.mm */,
29EDB8E51A7710B700458D80 /* RLMResults_Private.h */,
1A1EBF861F269E8E00F47698 /* RLMResults_Private.hpp */,
3F0BBB9529AFDA6600FEA7A7 /* RLMScheduler.h */,
3F0BBB9629AFDA6600FEA7A7 /* RLMScheduler.mm */,
E81A1F7E1955FC9300FDED82 /* RLMSchema.h */,
E81A1F7F1955FC9300FDED82 /* RLMSchema.mm */,
E81A1F7D1955FC9300FDED82 /* RLMSchema_Private.h */,
Expand Down Expand Up @@ -2036,6 +2056,8 @@
5D659EA91BE04556006515A0 /* RLMArray.h in Headers */,
5D659EAA1BE04556006515A0 /* RLMArray_Private.h in Headers */,
AC813612287F21700029F15E /* RLMAsymmetricObject.h in Headers */,
3FD0D7C729675A2E0031C196 /* RLMAsyncTask.h in Headers */,
3FDB67152970720E0052233B /* RLMAsyncTask_Private.h in Headers */,
49E12CF2245DB7E800359DF1 /* RLMBSON.h in Headers */,
49E12CF5245DBF8A00359DF1 /* RLMBSON_Private.hpp in Headers */,
5D659EAB1BE04556006515A0 /* RLMCollection.h in Headers */,
Expand Down Expand Up @@ -2080,6 +2102,7 @@
5D659EC31BE04556006515A0 /* RLMRealmConfiguration_Private.h in Headers */,
5D659EC51BE04556006515A0 /* RLMResults.h in Headers */,
5D659EC61BE04556006515A0 /* RLMResults_Private.h in Headers */,
3F0BBB9729AFDA6600FEA7A7 /* RLMScheduler.h in Headers */,
5D659EC71BE04556006515A0 /* RLMSchema.h in Headers */,
5D659EC81BE04556006515A0 /* RLMSchema_Private.h in Headers */,
CFDBC4B728803C7200EE80E6 /* RLMSectionedResults.h in Headers */,
Expand Down Expand Up @@ -2125,6 +2148,8 @@
5DD755A71BE056DE002800DA /* RLMArray.h in Headers */,
5DD755A81BE056DE002800DA /* RLMArray_Private.h in Headers */,
AC4793152881E2FF004E60F6 /* RLMAsymmetricObject.h in Headers */,
3FD0D7C829675A2E0031C196 /* RLMAsyncTask.h in Headers */,
3FDB67162970720E0052233B /* RLMAsyncTask_Private.h in Headers */,
49E12CF3245DB7E800359DF1 /* RLMBSON.h in Headers */,
49E12CF6245DBF8A00359DF1 /* RLMBSON_Private.hpp in Headers */,
5DD755A91BE056DE002800DA /* RLMCollection.h in Headers */,
Expand Down Expand Up @@ -2169,6 +2194,7 @@
5DD755C11BE056DE002800DA /* RLMRealmConfiguration_Private.h in Headers */,
5DD755C31BE056DE002800DA /* RLMResults.h in Headers */,
5DD755C41BE056DE002800DA /* RLMResults_Private.h in Headers */,
3F0BBB9829AFDA6600FEA7A7 /* RLMScheduler.h in Headers */,
5DD755C51BE056DE002800DA /* RLMSchema.h in Headers */,
5DD755C61BE056DE002800DA /* RLMSchema_Private.h in Headers */,
CFDBC4BA28803C8200EE80E6 /* RLMSectionedResults.h in Headers */,
Expand Down Expand Up @@ -2827,6 +2853,7 @@
4993220E24129DCE00A0EC8E /* RLMApp.mm in Sources */,
5D659E871BE04556006515A0 /* RLMArray.mm in Sources */,
AC813613287F21700029F15E /* RLMAsymmetricObject.mm in Sources */,
3FD0D7C929675A2E0031C196 /* RLMAsyncTask.mm in Sources */,
49E12CF0245DB7CC00359DF1 /* RLMBSON.mm in Sources */,
3F9863BB1D36876B00641C98 /* RLMClassInfo.mm in Sources */,
3FBEF67B1C63D66100F6935B /* RLMCollection.mm in Sources */,
Expand Down Expand Up @@ -2863,6 +2890,7 @@
5D659E951BE04556006515A0 /* RLMRealmConfiguration.mm in Sources */,
5D659E961BE04556006515A0 /* RLMRealmUtil.mm in Sources */,
5D659E971BE04556006515A0 /* RLMResults.mm in Sources */,
3F0BBB9929AFDA6600FEA7A7 /* RLMScheduler.mm in Sources */,
5D659E981BE04556006515A0 /* RLMSchema.mm in Sources */,
CFDBC4B628803C7200EE80E6 /* RLMSectionedResults.mm in Sources */,
CF986D2025AE3B090039D287 /* RLMSet.mm in Sources */,
Expand Down Expand Up @@ -3018,6 +3046,7 @@
3F275EC22433AB3E00161E7F /* RLMAPIKeyAuth.mm in Sources */,
4993220F24129DCE00A0EC8E /* RLMApp.mm in Sources */,
5DD755851BE056DE002800DA /* RLMArray.mm in Sources */,
3FD0D7CA29675A2E0031C196 /* RLMAsyncTask.mm in Sources */,
49DF0AA42463286800F7E0B8 /* RLMBSON.mm in Sources */,
3F9863BC1D36876B00641C98 /* RLMClassInfo.mm in Sources */,
3FBEF67C1C63D66400F6935B /* RLMCollection.mm in Sources */,
Expand Down Expand Up @@ -3054,6 +3083,7 @@
5DD755931BE056DE002800DA /* RLMRealmConfiguration.mm in Sources */,
5DD755941BE056DE002800DA /* RLMRealmUtil.mm in Sources */,
5DD755951BE056DE002800DA /* RLMResults.mm in Sources */,
3F0BBB9A29AFDA6600FEA7A7 /* RLMScheduler.mm in Sources */,
5DD755961BE056DE002800DA /* RLMSchema.mm in Sources */,
CFDBC4B828803C7700EE80E6 /* RLMSectionedResults.mm in Sources */,
CF986D2125AE3B090039D287 /* RLMSet.mm in Sources */,
Expand Down
7 changes: 7 additions & 0 deletions Realm.xcodeproj/xcshareddata/xcschemes/RealmSwift.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@
ReferencedContainer = "container:Realm.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL"
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this make the app crash in cases where the executor fails?

Copy link
Member Author

Choose a reason for hiding this comment

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

By default the actor data race detection merely logs a warning if it detects a problem, and we want our tests to visibly fail if they have a bug.

value = "2"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion Realm/ObjectServerTests/RLMFlexibleSyncServerTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ - (void)testFlexibleSyncInitialSubscriptionThrowsError {
callback:^(RLMRealm *realm, NSError *error) {
RLMValidateError(error, RLMErrorDomain, RLMErrorSubscriptionFailed,
@"Client provided query with bad syntax: unsupported query for table \"UUIDPrimaryKeyObject\": key \"strCol\" is not a queryable field");
XCTAssertNotNil(realm);
XCTAssertNil(realm);
tgoyne marked this conversation as resolved.
Show resolved Hide resolved
[ex fulfill];
}];
[self waitForExpectationsWithTimeout:30.0 handler:nil];
Expand Down
Loading