Skip to content

Commit

Permalink
Merge 0a46dd2 into 5ed4bee
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrenskers authored Dec 6, 2022
2 parents 5ed4bee + 0a46dd2 commit b77f733
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 63 deletions.
101 changes: 52 additions & 49 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,45 @@
"entries": {
"brew": {
"clang-format": {
"version": "15.0.4",
"version": "15.0.6",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:22ce42d45047a82dbaeb294c988491c8dc41a14db585aba895289b94c98567b5",
"sha256": "22ce42d45047a82dbaeb294c988491c8dc41a14db585aba895289b94c98567b5"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:fbf56abfb24a21c165be6354c24784fda0404eb0009acb24e7764f985cc46396",
"sha256": "fbf56abfb24a21c165be6354c24784fda0404eb0009acb24e7764f985cc46396"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:e6687055a4bbb8c45c534c97593da173020a89464131f8e28d9c51635abdf85e",
"sha256": "e6687055a4bbb8c45c534c97593da173020a89464131f8e28d9c51635abdf85e"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:863c6e225f28a486e59d9581a15a138f12a79be7ec0e88bfbb7a13dce69caed2",
"sha256": "863c6e225f28a486e59d9581a15a138f12a79be7ec0e88bfbb7a13dce69caed2"
},
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:635e65e903d7509bc7b66246b33e80c2c6fa7970ae5ae976b8115346298684af",
"sha256": "635e65e903d7509bc7b66246b33e80c2c6fa7970ae5ae976b8115346298684af"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:9dff09df90416010de10c0f2d5827d7088f752747b79c4b1dc2fdbfc8ec82bf2",
"sha256": "9dff09df90416010de10c0f2d5827d7088f752747b79c4b1dc2fdbfc8ec82bf2"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:313506ad3a59bdea702b964c76784cb280041960faff6f4ef30327a28e79107b",
"sha256": "313506ad3a59bdea702b964c76784cb280041960faff6f4ef30327a28e79107b"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:eaa6987f545e773b2af7030555198e441ce18ff1fc0be8728757cb167e271a4b",
"sha256": "eaa6987f545e773b2af7030555198e441ce18ff1fc0be8728757cb167e271a4b"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:840020306f475284733e073f7d3d1f4c2f2e14b8e1a89d79bfa2df8d4dee2c53",
"sha256": "840020306f475284733e073f7d3d1f4c2f2e14b8e1a89d79bfa2df8d4dee2c53"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:f2057cfecd05af214a620f359634001fe78fb25b21ec2c19885cd57e38af9e6f",
"sha256": "f2057cfecd05af214a620f359634001fe78fb25b21ec2c19885cd57e38af9e6f"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:9743f1cb8befbaacba5b60e22762fab2db9337fcbddb66ee9fae69ccb54174ab",
"sha256": "9743f1cb8befbaacba5b60e22762fab2db9337fcbddb66ee9fae69ccb54174ab"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:44458ac88b30b5fddfa0a9679339a6fdca3ad0cd9591f655387d7d12f85ce383",
"sha256": "44458ac88b30b5fddfa0a9679339a6fdca3ad0cd9591f655387d7d12f85ce383"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:047d4e2321824b31d4ec0208a85e114e579255c210f62e0415f618f1fbbe3362",
"sha256": "047d4e2321824b31d4ec0208a85e114e579255c210f62e0415f618f1fbbe3362"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:ba30cee4820b592e8ff594fe0174246286ed062c709e058c713d882a073ac388",
"sha256": "ba30cee4820b592e8ff594fe0174246286ed062c709e058c713d882a073ac388"
"url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:6a0d2f67c64a65e9411420b052c6f3cc234879ff62c8306c3090c19298abb4cc",
"sha256": "6a0d2f67c64a65e9411420b052c6f3cc234879ff62c8306c3090c19298abb4cc"
}
}
}
Expand All @@ -65,35 +60,35 @@
}
},
"swiftlint": {
"version": "0.49.1",
"version": "0.50.1",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:de4f931704cfdbd7300a74d8f0ef807394f3366ed1d3d59eabb87edcefa926af",
"sha256": "de4f931704cfdbd7300a74d8f0ef807394f3366ed1d3d59eabb87edcefa926af"
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:7d447fe250b531775462560ed2179b284addb279f7dd0b6d2533da12b3c9b42f",
"sha256": "7d447fe250b531775462560ed2179b284addb279f7dd0b6d2533da12b3c9b42f"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:d983879e2d9ea075bf80e223da5adb258f01d9fab4fc6f71f83c4add80490290",
"sha256": "d983879e2d9ea075bf80e223da5adb258f01d9fab4fc6f71f83c4add80490290"
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:77a486aa11b6a3cfea372752d945ff5a7f20a953261449199bdb0b0ed62da336",
"sha256": "77a486aa11b6a3cfea372752d945ff5a7f20a953261449199bdb0b0ed62da336"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:509e34c1cfdfda9dace98481bc42cc57575c78ffe7711d381b851c330ee4d8b8",
"sha256": "509e34c1cfdfda9dace98481bc42cc57575c78ffe7711d381b851c330ee4d8b8"
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:d2c6d79212a79f3b1acee88ab44018eccf20e9fce12c69c31c782536f92493d6",
"sha256": "d2c6d79212a79f3b1acee88ab44018eccf20e9fce12c69c31c782536f92493d6"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:73a9664d8a62c7b5d506a70bf100e0289795df04ece6df12f0b77651e497d42b",
"sha256": "73a9664d8a62c7b5d506a70bf100e0289795df04ece6df12f0b77651e497d42b"
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:af0964ac41d78b6dd2eb3affba7b1a01cdb43649196fe0bf139d72589195e110",
"sha256": "af0964ac41d78b6dd2eb3affba7b1a01cdb43649196fe0bf139d72589195e110"
},
"x86_64_linux": {
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:705904346a73422be8f053d7b1c413e5d18623bd7244cb33d188d921a072e600",
"sha256": "705904346a73422be8f053d7b1c413e5d18623bd7244cb33d188d921a072e600"
"url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:13328073f6c8f572ab9c5e5e1fe170b54ff43ac7038b13d602e361619cbea474",
"sha256": "13328073f6c8f572ab9c5e5e1fe170b54ff43ac7038b13d602e361619cbea474"
}
}
}
Expand Down Expand Up @@ -202,50 +197,50 @@
}
},
"pre-commit": {
"version": "2.20.0",
"version": "2.20.0_1",
"bottle": {
"rebuild": 2,
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:5270c8f90c5343d8b0e5eeccfd01d1058957f05c5da7fd2c0d4e4af1fab1ed9f",
"sha256": "5270c8f90c5343d8b0e5eeccfd01d1058957f05c5da7fd2c0d4e4af1fab1ed9f"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:bc4ab3b751e5a0aafab0d8943ea66309034aed85392e8d09d252e0f14e17f08e",
"sha256": "bc4ab3b751e5a0aafab0d8943ea66309034aed85392e8d09d252e0f14e17f08e"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:70cb628421bae2e6136cbc076dd620b2e3a1229ce93e47ad5592fe7739e3420b",
"sha256": "70cb628421bae2e6136cbc076dd620b2e3a1229ce93e47ad5592fe7739e3420b"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:1cf2fbb0c8ffe108e30a425fc95eb2942fc07f5af69dc9cc023c2ef85cf56591",
"sha256": "1cf2fbb0c8ffe108e30a425fc95eb2942fc07f5af69dc9cc023c2ef85cf56591"
},
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:667e0b88c513b4ebc18265f3885c2fe5da0f0126f759cdf4cecaf52b5b1123b8",
"sha256": "667e0b88c513b4ebc18265f3885c2fe5da0f0126f759cdf4cecaf52b5b1123b8"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:7503a587bdf501da0dcef03fa9a56839d35f6f8750eb420397ed334bb9728fe3",
"sha256": "7503a587bdf501da0dcef03fa9a56839d35f6f8750eb420397ed334bb9728fe3"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:b091378b66c94fbdf5b901c4b1a8894501e7a109722b9994de794e41136f3c5d",
"sha256": "b091378b66c94fbdf5b901c4b1a8894501e7a109722b9994de794e41136f3c5d"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:f5082e39ff0265fdaf0d6b34e5711f447b5442df8d39db831cce7b28718ea30b",
"sha256": "f5082e39ff0265fdaf0d6b34e5711f447b5442df8d39db831cce7b28718ea30b"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:aff7fa28a2dacf9fbee3688cdea29c3fcf389044f791cc6284919b4f69172a5a",
"sha256": "aff7fa28a2dacf9fbee3688cdea29c3fcf389044f791cc6284919b4f69172a5a"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a2c37345ccf7aaf9bc5f46559f3f1fff0651f2af4370e5f8c20ed1dc20513580",
"sha256": "a2c37345ccf7aaf9bc5f46559f3f1fff0651f2af4370e5f8c20ed1dc20513580"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:53f5ba9dca685812cf1de4a2760313fe134a5f7e5bd1eff1439e82c16129a94f",
"sha256": "53f5ba9dca685812cf1de4a2760313fe134a5f7e5bd1eff1439e82c16129a94f"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:72c36305b1d3fb44c59e11c3b937339c4e9759cdbe6671e134fd3f58b25131e6",
"sha256": "72c36305b1d3fb44c59e11c3b937339c4e9759cdbe6671e134fd3f58b25131e6"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:0d801a89ff2c787a8c8980ff53833dc8255c885fbd1cbdf4934c27d5cd49f407",
"sha256": "0d801a89ff2c787a8c8980ff53833dc8255c885fbd1cbdf4934c27d5cd49f407"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:bb51f828d685794021556971cd2269c141fdb2f696f26e475f22104527673a3e",
"sha256": "bb51f828d685794021556971cd2269c141fdb2f696f26e475f22104527673a3e"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:b08cce9e555890e9d84d0bd987ce9e9a3b87da1297c8bb6a728c17d3f59ed2c3",
"sha256": "b08cce9e555890e9d84d0bd987ce9e9a3b87da1297c8bb6a728c17d3f59ed2c3"
"url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:9ce40596bbb828e137dcf918ba0954a3095f99b922c053cc4e9c13bb55a5b283",
"sha256": "9ce40596bbb828e137dcf918ba0954a3095f99b922c053cc4e9c13bb55a5b283"
}
}
}
Expand Down Expand Up @@ -305,6 +300,14 @@
"CLT": "14.0.0.0.1.1661618636",
"Xcode": "14.1",
"macOS": "12.6"
},
"ventura": {
"HOMEBREW_VERSION": "3.6.14",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "456895e7fb9656a4fdc13f2b6035f208e071cbb8",
"CLT": "14.1.0.0.1.1666437224",
"Xcode": "14.1",
"macOS": "13.0.1"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private struct RGBADecimalComponents: Hashable {

// Relative luminance formula: https://en.wikipedia.org/wiki/Relative_luminance
var luminance: CGFloat {
0.212_6 * r + 0.715_2 * g + 0.072_2 * b
0.2126 * r + 0.7152 * g + 0.0722 * b
}

var isDarkColor: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PerformanceViewController: UIViewController {
// refresh rate of 60 hz is 0.0167
// 120 hz is 0.0083
// 240 hz is 0.004167
private let interval = 0.000_000_05
private let interval = 0.00000005

private var timer: Timer?
private let iterations = 5_000_000
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/SentryCurrentDate.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ @implementation SentryCurrentDate

+ (NSDate *)date
{
if (nil == currentDateProvider) {
if (currentDateProvider == nil) {
currentDateProvider = [SentryDefaultCurrentDateProvider sharedInstance];
}
return [currentDateProvider date];
}

+ (dispatch_time_t)dispatchTimeNow
{
if (nil == currentDateProvider) {
if (currentDateProvider == nil) {
currentDateProvider = [SentryDefaultCurrentDateProvider sharedInstance];
}
return [currentDateProvider dispatchTimeNow];
Expand Down
8 changes: 4 additions & 4 deletions Sources/Sentry/SentryDateUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ @implementation SentryDateUtil

+ (BOOL)isInFuture:(NSDate *_Nullable)date
{
if (nil == date)
if (date == nil)
return NO;

NSComparisonResult result = [[SentryCurrentDate date] compare:date];
Expand All @@ -21,11 +21,11 @@ + (BOOL)isInFuture:(NSDate *_Nullable)date

+ (NSDate *_Nullable)getMaximumDate:(NSDate *_Nullable)first andOther:(NSDate *_Nullable)second
{
if (nil == first && nil == second)
if (first == nil && second == nil)
return nil;
if (nil == first)
if (first == nil)
return second;
if (nil == second)
if (second == nil)
return first;

NSComparisonResult result = [first compare:second];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class SentryAppStartTrackerTests: NotificationCenterTestCase {

let expectedAppStartDuration = expectedDuration ?? fixture.appStartDuration
let actualAppStartDuration = appStartMeasurement.duration
XCTAssertEqual(expectedAppStartDuration, actualAppStartDuration, accuracy: 0.000_1)
XCTAssertEqual(expectedAppStartDuration, actualAppStartDuration, accuracy: 0.0001)

if preWarmed {
XCTAssertEqual(fixture.moduleInitializationTimestamp, appStartMeasurement.appStartTimestamp)
Expand All @@ -420,7 +420,7 @@ class SentryAppStartTrackerTests: NotificationCenterTestCase {
XCTAssertEqual(type.rawValue, appStartMeasurement.type.rawValue)

let actualAppStartDuration = appStartMeasurement.duration
XCTAssertEqual(0.0, actualAppStartDuration, accuracy: 0.000_1)
XCTAssertEqual(0.0, actualAppStartDuration, accuracy: 0.0001)

XCTAssertEqual(fixture.sysctl.processStartTimestamp, appStartMeasurement.appStartTimestamp)
XCTAssertEqual(fixture.runtimeInitTimestamp, appStartMeasurement.runtimeInitTimestamp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class SentryCrashScopeObserverTests: XCTestCase {
return jsonPointer!.pointee
}

private func getScopeJson(getField: (SentryCrashScope)-> UnsafeMutablePointer<CChar>?) -> String? {
private func getScopeJson(getField: (SentryCrashScope) -> UnsafeMutablePointer<CChar>?) -> String? {
guard let scopePointer = sentrycrash_scopesync_getScope() else {
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class SentryHttpTransportTests: XCTestCase {

func testSendEnvelopesConcurrent() {
self.measure {
fixture.requestManager.responseDelay = 0.000_1
fixture.requestManager.responseDelay = 0.0001

let queue = fixture.queue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase {
}

func testAppStartCrash_DurationTooBig_DoesNotCallFlush() {
fixture.crashWrapper.internalDurationFromCrashStateInitToLastCrash = 2.000_01
fixture.crashWrapper.internalDurationFromCrashStateInitToLastCrash = 2.00001

filterReportWithAttachment()

Expand Down
2 changes: 1 addition & 1 deletion Tests/SentryTests/SentryScopeSwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class SentryScopeSwiftTests: XCTestCase {

func testUseSpanForClear() {
fixture.scope.span = fixture.transaction
fixture.scope.useSpan { (span) in
fixture.scope.useSpan { (_) in
self.fixture.scope.span = nil
}
XCTAssertNil(fixture.scope.span)
Expand Down

0 comments on commit b77f733

Please sign in to comment.