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

Revert to Xcode 12.5.1 and fix lint errors #182

Merged
merged 11 commits into from
Aug 18, 2022
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

defaults:
default-xcode-version: &default-xcode-version "13.4.1"
default-xcode-version: &default-xcode-version "12.5.1"
default-ruby-version: &default-ruby-version "2.7"

default-environment: &default-environment
Expand Down
3 changes: 3 additions & 0 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -344,6 +345,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -446,6 +448,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down
3 changes: 3 additions & 0 deletions ExampleHTTP/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -344,6 +345,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -446,6 +448,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down
12 changes: 8 additions & 4 deletions Sources/Fog/Report/FogReportServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ extension FogReportServer {
private var cachedReportResponse: Report_ReportResponse?

func cachedReportResponse(
satisfyingReportParams reportParams: [(reportId: String, minPubkeyExpiry: UInt64)]
satisfyingReportParams reportParams: [(reportId: String,
desiredMinPubkeyExpiry: UInt64)]
) -> Report_ReportResponse? {
logger.info("reportParams: \(reportParams)")
guard let reportResponse = cachedReportResponse else {
Expand All @@ -129,9 +130,12 @@ extension FogReportServer {
}

extension Report_ReportResponse {
fileprivate func isValid(reportParams: [(reportId: String, minPubkeyExpiry: UInt64)]) -> Bool {
reportParams.allSatisfy { reportId, minPubkeyExpiry in
reports.contains { $0.fogReportID == reportId && $0.pubkeyExpiry >= minPubkeyExpiry }
fileprivate func isValid(reportParams: [(reportId: String,
desiredMinPubkeyExpiry: UInt64)]) -> Bool {
reportParams.allSatisfy { reportId, desiredMinPubkeyExpiry in
reports.contains {
$0.fogReportID == reportId && $0.pubkeyExpiry >= desiredMinPubkeyExpiry
}
}
}
}
4 changes: 4 additions & 0 deletions Sources/MobileCoinClient+Async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import Foundation

#if swift(>=5.5)

@available(iOS 13.0, *)
extension MobileCoinClient {

Expand Down Expand Up @@ -75,3 +77,5 @@ extension MobileCoinClient {
}

}

#endif
6 changes: 6 additions & 0 deletions Sources/Utils/Async/AsyncUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func performAsync<Value1, Value2, Failure: Error>(
body2(callback(success: { results.1 = $0 }))
}

#if swift(>=5.5)
// swiftlint:disable superfluous_disable_command
// swiftlint:disable multiline_parameters

@available(iOS 13.0, *)
public func withTimeout<T>(
seconds: TimeInterval,
Expand All @@ -69,3 +73,5 @@ public func withTimeout<T>(
return result
}
}

#endif
6 changes: 6 additions & 0 deletions Tests/Common/Utils/XCTestCase+SupportedProtocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ extension XCTestCase {
}
}

#if swift(>=5.5)
// swiftlint:disable superfluous_disable_command
// swiftlint:disable multiline_parameters

@available(iOS 13.0, *)
func testSupportedProtocols(
description: String,
Expand All @@ -47,4 +51,6 @@ extension XCTestCase {
}
}

#endif

}
6 changes: 6 additions & 0 deletions Tests/Integration/IntegrationTestFixtures+Async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
@testable import MobileCoin
import XCTest

#if swift(>=5.5)
// swiftlint:disable superfluous_disable_command
// swiftlint:disable multiline_parameters

@available(iOS 13.0, *)
extension IntegrationTestFixtures {

Expand All @@ -21,3 +25,5 @@ extension IntegrationTestFixtures {
}

}

#endif
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable superfluous_disable_command
// swiftlint:disable type_body_length
// swiftlint:disable file_length
// swiftlint:disable empty_xctest_method

import MobileCoin
import XCTest

#if swift(>=5.5)

@available(iOS 13.0, *)
class MobileCoinClientPublicAsyncApiIntTests: XCTestCase {

Expand Down Expand Up @@ -640,3 +644,5 @@ class MobileCoinClientPublicAsyncApiIntTests: XCTestCase {
}

}

#endif