Skip to content

Commit

Permalink
Upgrade to core 13.23.0 (#8391)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne authored Oct 9, 2023
1 parent 16273bd commit becc933
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 45 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
x.y.z Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* None.

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
* None.

<!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->

### Compatibility
* Realm Studio: 14.0.1 or later.
* APIs are backwards compatible with all previous releases in the 10.x.y series.
* Carthage release for Swift is built with Xcode 15.0.0.
* CocoaPods: 1.10 or later.
* Xcode: 14.1-15.0.0.

### Internal
* Upgraded realm-core from 13.22.0 to 13.23.0

10.43.0 Release notes (2023-09-29)
=============================================================

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription
import Foundation

let coreVersion = Version("13.22.0")
let coreVersion = Version("13.23.0")
let cocoaVersion = Version("10.43.0")

let cxxSettings: [CXXSetting] = [
Expand Down
33 changes: 0 additions & 33 deletions Realm/ObjectServerTests/RLMAsymmetricSyncServerTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,6 @@ + (bool)_realmIgnoreClass {
}
@end

#pragma mark UnsupportedLinkObject

@interface UnsupportedLinkObject : RLMAsymmetricObject
@property RLMObjectId *_id;
@property RLM_GENERIC_ARRAY(Person) *objectArray;
@end

@implementation UnsupportedLinkObject
+ (NSDictionary *)defaultPropertyValues {
return @{@"_id": [RLMObjectId objectId]};
}

+ (NSString *)primaryKey {
return @"_id";
}

+ (bool)_realmIgnoreClass {
return true;
}
@end

#pragma mark UnsupportedObjectLinkAsymmetric

@interface UnsupportedObjectLinkAsymmetric : RLMObject
Expand Down Expand Up @@ -232,18 +211,6 @@ - (void)testUnsupportedAsymmetricLinkAsymmetricThrowsError {
XCTAssert([error.localizedDescription containsString:@"Property 'UnsupportedLinkAsymmetric.objectArray' of type 'array' cannot be a link to an asymmetric object."]);
}

- (void)testUnsupportedAsymmetricLinkObjectThrowsError {
RLMUser *user = [self userForSelector:_cmd];
RLMRealmConfiguration *configuration = [user flexibleSyncConfiguration];
configuration.objectClasses = @[UnsupportedLinkObject.self, Person.self];
NSError *error;
RLMRealm *realm = [RLMRealm realmWithConfiguration:configuration error:&error];
XCTAssertNil(realm);
// Schema validation allows this but then creating the column fails. This is
// a core bug and this test will start failing as soon as it's fixed.
XCTAssert([error.localizedDescription containsString:@"List of objects not supported in asymmetric table"]);
}

- (void)testUnsupportedObjectLinksAsymmetricThrowsError {
RLMUser *user = [self userForSelector:_cmd];
RLMRealmConfiguration *configuration = [user flexibleSyncConfiguration];
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMMigration.mm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ - (void)enumerateObjects:(NSString *)className block:(__attribute__((noescape))
}
}

- (void)execute:(RLMMigrationBlock)block objectClass:(Class)dynamicObjectClass {
- (void)execute:(RLMMigrationBlock)block objectClass:(::Class)dynamicObjectClass {
if (!dynamicObjectClass) {
dynamicObjectClass = RLMDynamicObject.class;
}
Expand Down
7 changes: 2 additions & 5 deletions Realm/RLMObjectBase.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@
#import <realm/object-store/object_schema.hpp>
#import <realm/object-store/shared_realm.hpp>

using namespace realm;

const NSUInteger RLMDescriptionMaxDepth = 5;


static bool isManagedAccessorClass(Class cls) {
const char *className = class_getName(cls);
const char accessorClassPrefix[] = "RLM:Managed";
Expand Down Expand Up @@ -425,7 +422,7 @@ + (void)observe:(RLMObjectBase *)object
#pragma mark - Thread Confined Protocol Conformance

- (realm::ThreadSafeReference)makeThreadSafeReference {
return Object(_realm->_realm, *_info->objectSchema, _row);
return realm::Object(_realm->_realm, *_info->objectSchema, _row);
}

- (id)objectiveCMetadata {
Expand All @@ -435,7 +432,7 @@ - (id)objectiveCMetadata {
+ (instancetype)objectWithThreadSafeReference:(realm::ThreadSafeReference)reference
metadata:(__unused id)metadata
realm:(RLMRealm *)realm {
Object object = reference.resolve<Object>(realm->_realm);
auto object = reference.resolve<realm::Object>(realm->_realm);
if (!object.is_valid()) {
return nil;
}
Expand Down
3 changes: 1 addition & 2 deletions Realm/RLMObjectStore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

#import <objc/message.h>

using namespace realm;

static inline void RLMVerifyRealmRead(__unsafe_unretained RLMRealm *const realm) {
if (!realm) {
@throw RLMException(@"Realm must not be nil");
Expand Down Expand Up @@ -92,6 +90,7 @@ void RLMVerifyHasPrimaryKey(Class cls) {
}
}

using realm::CreatePolicy;
static CreatePolicy updatePolicyToCreatePolicy(RLMUpdatePolicy policy) {
CreatePolicy createPolicy = {.create = true, .copy = false, .diff = false, .update = false};
switch (policy) {
Expand Down
4 changes: 2 additions & 2 deletions Realm/Tests/MigrationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ - (RLMRealmConfiguration *)config {

- (void)createTestRealmWithClasses:(NSArray *)classes block:(void (^)(RLMRealm *realm))block {
NSMutableArray *objectSchema = [NSMutableArray arrayWithCapacity:classes.count];
for (Class cls in classes) {
for (::Class cls in classes) {
[objectSchema addObject:[RLMObjectSchema schemaForObjectClass:cls]];
}
[self createTestRealmWithSchema:objectSchema block:block];
Expand Down Expand Up @@ -1210,7 +1210,7 @@ - (void)testEnumerateObjectsAfterDeleteData {
}];
}

- (RLMResults *)objectsOfType:(Class)cls {
- (RLMResults *)objectsOfType:(::Class)cls {
auto config = self.config;
config.schemaVersion = 1;
RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:nil];
Expand Down
2 changes: 1 addition & 1 deletion dependencies.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION=10.43.0
REALM_CORE_VERSION=13.22.0
REALM_CORE_VERSION=13.23.0
STITCH_VERSION=1eb31b87154cf7af6cbe50ab2732e2856ca499c7

0 comments on commit becc933

Please sign in to comment.