Skip to content

Commit adaea94

Browse files
authored
Merge branch 'main' into itay/cocoa-533-convert-sentryreachability-to-swift
2 parents c63a997 + ef2c9b3 commit adaea94

File tree

4 files changed

+24
-40
lines changed

4 files changed

+24
-40
lines changed

.github/workflows/benchmarking.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ jobs:
4646
bundler-cache: true
4747
- name: Install old xcodegen
4848
# Install xcodegen 2.43.0 for since newer versions don't work with Xcode older than Xcode 16
49+
# We need to set HOMEBREW_DEVELOPER=1 to allow installing from a local formula
4950
run: |
50-
brew install --formula ./scripts/xcodegen.rb
51+
HOMEBREW_DEVELOPER=1 brew install --formula ./scripts/xcodegen.rb
5152
brew pin xcodegen
5253
- run: make init-ci-build
5354
- run: make xcode-ci

.github/workflows/ui-tests-common.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ jobs:
5959
- name: Install old xcodegen
6060
if: ${{ inputs.xcode_version == '14.3.1' || inputs.xcode_version == '15.4' }}
6161
# Install xcodegen 2.43.0 for since newer versions don't work with Xcode older than Xcode 16
62+
# We need to set HOMEBREW_DEVELOPER=1 to allow installing from a local formula
6263
run: |
63-
brew install --formula ./scripts/xcodegen.rb
64+
HOMEBREW_DEVELOPER=1 brew install --formula ./scripts/xcodegen.rb
6465
brew pin xcodegen
6566
6667
- name: Select Xcode version

Tests/SentryTests/SentryClientTests.swift

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,40 +1312,35 @@ class SentryClientTests: XCTestCase {
13121312
let serializedSpans = try XCTUnwrap(serialized["spans"] as? [[String: Any]])
13131313
XCTAssertEqual(1, serializedSpans.count)
13141314
}
1315-
1316-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1315+
13171316
func testNoDsn_MessageNotSent() {
13181317
let sut = fixture.getSutWithNoDsn()
13191318
let eventId = sut.capture(message: fixture.messageAsString)
13201319
eventId.assertIsEmpty()
13211320
assertNothingSent()
13221321
}
1323-
1324-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1322+
13251323
func testDisabled_MessageNotSent() {
13261324
let sut = fixture.getSutDisabledSdk()
13271325
let eventId = sut.capture(message: fixture.messageAsString)
13281326
eventId.assertIsEmpty()
13291327
assertNothingSent()
13301328
}
1331-
1332-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1329+
13331330
func testNoDsn_ExceptionNotSent() {
13341331
let sut = fixture.getSutWithNoDsn()
13351332
let eventId = sut.capture(exception: exception)
13361333
eventId.assertIsEmpty()
13371334
assertNothingSent()
13381335
}
1339-
1340-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1336+
13411337
func testNoDsn_ErrorNotSent() {
13421338
let sut = fixture.getSutWithNoDsn()
13431339
let eventId = sut.capture(error: error)
13441340
eventId.assertIsEmpty()
13451341
assertNothingSent()
13461342
}
1347-
1348-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1343+
13491344
func testNoDsn_SessionsNotSent() {
13501345
_ = SentryEnvelope(event: Event())
13511346
fixture.getSut(configureOptions: { options in
@@ -1354,8 +1349,7 @@ class SentryClientTests: XCTestCase {
13541349

13551350
assertNothingSent()
13561351
}
1357-
1358-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1352+
13591353
func testNoDsn_EventWithSessionsNotSent() {
13601354
_ = SentryEnvelope(event: Event())
13611355
let eventId = fixture.getSut(configureOptions: { options in
@@ -1365,8 +1359,7 @@ class SentryClientTests: XCTestCase {
13651359
eventId.assertIsEmpty()
13661360
assertNothingSent()
13671361
}
1368-
1369-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1362+
13701363
func testNoDsn_ExceptionWithSessionsNotSent() {
13711364
_ = SentryEnvelope(event: Event())
13721365
let eventId = fixture.getSut(configureOptions: { options in
@@ -1378,8 +1371,7 @@ class SentryClientTests: XCTestCase {
13781371
eventId.assertIsEmpty()
13791372
assertNothingSent()
13801373
}
1381-
1382-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1374+
13831375
func testNoDsn_ErrorWithSessionsNotSent() {
13841376
_ = SentryEnvelope(event: Event())
13851377
let eventId = fixture.getSut(configureOptions: { options in
@@ -1391,23 +1383,19 @@ class SentryClientTests: XCTestCase {
13911383
eventId.assertIsEmpty()
13921384
assertNothingSent()
13931385
}
1394-
1395-
@available(*, deprecated, message: "This is only marked as deprecated because assertSampleRate is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1386+
13961387
func testSampleRateNil_EventNotSampled() throws {
13971388
try assertSampleRate(sampleRate: nil, randomValue: 0, isSampled: false)
13981389
}
1399-
1400-
@available(*, deprecated, message: "This is only marked as deprecated because assertSampleRate is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1390+
14011391
func testSampleRateBiggerRandom_EventNotSampled() throws {
14021392
try assertSampleRate(sampleRate: 0.5, randomValue: 0.49, isSampled: false)
14031393
}
1404-
1405-
@available(*, deprecated, message: "This is only marked as deprecated because assertSampleRate is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1394+
14061395
func testSampleRateEqualsRandom_EventNotSampled() throws {
14071396
try assertSampleRate(sampleRate: 0.5, randomValue: 0.5, isSampled: false)
14081397
}
1409-
1410-
@available(*, deprecated, message: "This is only marked as deprecated because assertSampleRate is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, these deprecation annotations can go away.")
1398+
14111399
func testSampleRateSmallerRandom_EventSampled() throws {
14121400
try assertSampleRate(sampleRate: 0.50, randomValue: 0.51, isSampled: true)
14131401
}
@@ -1621,35 +1609,31 @@ class SentryClientTests: XCTestCase {
16211609
XCTAssertEqual(fixture.transport.recordLostEventsWithCount.get(2)?.reason, SentryDiscardReason.eventProcessor)
16221610
XCTAssertEqual(fixture.transport.recordLostEventsWithCount.get(2)?.quantity, 1)
16231611
}
1624-
@available(*, deprecated, message: "-[SentryClient captureUserFeedback:] is deprecated. -[SentryClient captureFeedback:withScope:] is the new way. This test case can be removed in favor of testNoDsn_FeedbackNotSent when -[SentryClient captureUserFeedback:] is removed.")
1612+
16251613
func testNoDsn_UserFeedbackNotSent() {
16261614
let sut = fixture.getSutWithNoDsn()
16271615
sut.capture(userFeedback: UserFeedback(eventId: SentryId()))
16281616
assertNothingSent()
16291617
}
1630-
1631-
@available(*, deprecated, message: "-[SentryClient captureUserFeedback:] is deprecated. -[SentryClient captureFeedback:withScope:] is the new way. This test case can be removed in favor of testDisabled_FeedbackNotSent when -[SentryClient captureUserFeedback:] is removed.")
1618+
16321619
func testDisabled_UserFeedbackNotSent() {
16331620
let sut = fixture.getSutDisabledSdk()
16341621
sut.capture(userFeedback: UserFeedback(eventId: SentryId()))
16351622
assertNothingSent()
16361623
}
1637-
1638-
@available(*, deprecated, message: "-[SentryClient captureUserFeedback:] is deprecated. -[SentryClient captureFeedback:withScope:] is the new way. This test case can be removed in favor of testCaptureFeedback_WithEmptyEventId when -[SentryClient captureUserFeedback:] is removed.")
1624+
16391625
func testCaptureUserFeedback_WithEmptyEventId() {
16401626
let sut = fixture.getSut()
16411627
sut.capture(userFeedback: UserFeedback(eventId: SentryId.empty))
16421628
assertNothingSent()
16431629
}
1644-
1645-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, this deprecation annotation can go away.")
1630+
16461631
func testNoDsn_FeedbackNotSent() {
16471632
let sut = fixture.getSutWithNoDsn()
16481633
sut.capture(feedback: fixture.feedback, scope: fixture.scope)
16491634
assertNothingSent()
16501635
}
1651-
1652-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, this deprecation annotation can go away.")
1636+
16531637
func testDisabled_FeedbackNotSent() {
16541638
let sut = fixture.getSutDisabledSdk()
16551639
sut.capture(feedback: fixture.feedback, scope: fixture.scope)
@@ -2395,8 +2379,7 @@ private extension SentryClientTests {
23952379
private func shortenIntegrations(_ integrations: [String]?) -> [String]? {
23962380
return integrations?.map { $0.replacingOccurrences(of: "Sentry", with: "").replacingOccurrences(of: "Integration", with: "") }
23972381
}
2398-
2399-
@available(*, deprecated, message: "Remove check on transportAdapter.userFeedbackInvocations when SentryUserFeedback is removed in favor of SentryFeedback. Then this deprecation annotation can be removed.")
2382+
24002383
private func assertNothingSent() {
24012384
XCTAssertTrue(fixture.transport.sentEnvelopes.isEmpty)
24022385
XCTAssertEqual(0, fixture.transportAdapter.sentEventsWithSessionTraceState.count)
@@ -2459,8 +2442,7 @@ private extension SentryClientTests {
24592442

24602443
}
24612444
#endif
2462-
2463-
@available(*, deprecated, message: "This is only marked as deprecated because assertNothingSent is marked as deprecated, due to it using a deprecated property inside it. When that property usage is removed, this deprecation annotations can be removed.")
2445+
24642446
func assertSampleRate( sampleRate: NSNumber?, randomValue: Double, isSampled: Bool) throws {
24652447
fixture.random.value = randomValue
24662448

scripts/.swiftlint-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.59.1
1+
0.60.0

0 commit comments

Comments
 (0)