Skip to content

Commit

Permalink
Merge pull request #8143 from realm/tg/xcode-14.3
Browse files Browse the repository at this point in the history
Fix new warnings introduced in Swift 5.8
  • Loading branch information
tgoyne authored Feb 28, 2023
2 parents 9c6c86a + c98cc40 commit be0a14b
Show file tree
Hide file tree
Showing 159 changed files with 752 additions and 592 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ x.y.z Release notes (yyyy-MM-dd)
* `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.

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

### Compatibility
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Base.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; // This is Xcode's typo
CLANG_WARN_DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
Expand All @@ -28,6 +27,7 @@ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; // This is Xcode's typo
COMBINE_HIDPI_IMAGES = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down
5 changes: 4 additions & 1 deletion Realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ Pod::Spec.new do |s|

# Realm.Dynamic module
'include/RLMRealm_Dynamic.h',
'include/RLMObjectBase_Dynamic.h'
'include/RLMObjectBase_Dynamic.h',

# Realm.Swift module
'include/RLMSwiftObject.h'

# Realm.Private module
private_header_files = 'include/RLMAccessor.h',
Expand Down
13 changes: 10 additions & 3 deletions Realm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@
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, ); }; };
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 @@ -932,6 +934,7 @@
3FC3F911241808B300E27322 /* RLMEmbeddedObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMEmbeddedObject.mm; sourceTree = "<group>"; };
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>"; };
3FE267CF264308670030F83C /* CollectionAccess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAccess.swift; sourceTree = "<group>"; };
3FE267D0264308680030F83C /* ComplexTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComplexTypes.swift; sourceTree = "<group>"; };
3FE267D1264308680030F83C /* BasicTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicTypes.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1198,8 +1201,8 @@
E81A1FD11955FE0100FDED82 /* TransactionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransactionTests.m; sourceTree = "<group>"; };
E8267FED1D90B79000E001C7 /* ObjectServerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectServerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E8267FF01D90B8E700E001C7 /* RLMObjectServerTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = RLMObjectServerTests.mm; path = Realm/ObjectServerTests/RLMObjectServerTests.mm; sourceTree = "<group>"; };
E82FA60A195632F20043A3C3 /* SwiftArrayPropertyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftArrayPropertyTests.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
E82FA60B195632F20043A3C3 /* SwiftArrayTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftArrayTests.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
E82FA60A195632F20043A3C3 /* SwiftArrayPropertyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftArrayPropertyTests.swift; sourceTree = "<group>"; };
E82FA60B195632F20043A3C3 /* SwiftArrayTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftArrayTests.swift; sourceTree = "<group>"; };
E82FA60D195632F20043A3C3 /* SwiftLinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftLinkTests.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
E82FA60F195632F20043A3C3 /* SwiftObjectInterfaceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SwiftObjectInterfaceTests.swift; sourceTree = "<group>"; };
E83591931B3DF05C0035F2F3 /* RLMAnalytics.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RLMAnalytics.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1949,6 +1952,7 @@
CF986D1C25AE3B090039D287 /* RLMSet_Private.hpp */,
023B19551A3BA90D0067FB81 /* RLMSwiftCollectionBase.h */,
023B19561A3BA90D0067FB81 /* RLMSwiftCollectionBase.mm */,
3FCC56E329A55607004C5057 /* RLMSwiftObject.h */,
3F83E9A22630A14800FC9623 /* RLMSwiftProperty.h */,
3FE79FF719BA6A5900780C9A /* RLMSwiftSupport.h */,
3F452EC519C2279800AFC154 /* RLMSwiftSupport.m */,
Expand Down Expand Up @@ -2069,6 +2073,7 @@
CF986D2425AE3B090039D287 /* RLMSet.h in Headers */,
CF986D1E25AE3B090039D287 /* RLMSet_Private.h in Headers */,
5D659EAE1BE04556006515A0 /* RLMSwiftCollectionBase.h in Headers */,
3FCC56E429A55607004C5057 /* RLMSwiftObject.h in Headers */,
3F83E9A42630A14800FC9623 /* RLMSwiftProperty.h in Headers */,
5D659EC91BE04556006515A0 /* RLMSwiftSupport.h in Headers */,
3F1D9092265C07A600593ABA /* RLMSwiftValueStorage.h in Headers */,
Expand Down Expand Up @@ -2158,6 +2163,7 @@
CF986D2525AE3B090039D287 /* RLMSet.h in Headers */,
CF986D1F25AE3B090039D287 /* RLMSet_Private.h in Headers */,
5DD755AC1BE056DE002800DA /* RLMSwiftCollectionBase.h in Headers */,
3FCC56E529A55607004C5057 /* RLMSwiftObject.h in Headers */,
3F34EC53268698BD000087A4 /* RLMSwiftProperty.h in Headers */,
5DD755C71BE056DE002800DA /* RLMSwiftSupport.h in Headers */,
3F1D9093265C07A700593ABA /* RLMSwiftValueStorage.h in Headers */,
Expand Down Expand Up @@ -2437,10 +2443,11 @@
E8D89B8F1955FC6D00CF2B9A /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
CLASSPREFIX = RLM;
LastSwiftUpdateCheck = 1230;
LastTestingUpgradeCheck = 0510;
LastUpgradeCheck = 1410;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = Realm;
TargetAttributes = {
3F1A5E711992EB7400F45F4C = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Realm.xcodeproj/xcshareddata/xcschemes/Realm.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Realm.xcodeproj/xcshareddata/xcschemes/RealmSwift.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Realm.xcodeproj/xcshareddata/xcschemes/SwiftLint.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Realm.xcodeproj/xcshareddata/xcschemes/TestHost.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions Realm/ObjectServerTests/EventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class SwiftEventTests: SwiftSyncTestCase {
"person": a,
"people": [b, c],
"peopleByName": [b.firstName: b, c.firstName: c]
])
] as [String: Any])
}

let objects = realm.objects(SwiftPerson.self)
Expand Down Expand Up @@ -329,7 +329,7 @@ class SwiftEventTests: SwiftSyncTestCase {
"person": a,
"people": [b, c],
"peopleByName": [b.firstName: b, c.firstName: c]
])._id
] as [String: Any])._id
}

let objects = realm.objects(LinkToSwiftPerson.self)
Expand Down
Loading

0 comments on commit be0a14b

Please sign in to comment.